Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | inherit setuptools3-base python_pep517 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 3 | DEPENDS += "python3-setuptools-native python3-wheel-native" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4 | |
| 5 | SETUPTOOLS_BUILD_ARGS ?= "" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 6 | |
| 7 | SETUPTOOLS_SETUP_PATH ?= "${S}" |
| 8 | |
| 9 | setuptools3_do_configure() { |
| 10 | : |
| 11 | } |
| 12 | |
| 13 | setuptools3_do_compile() { |
| 14 | cd ${SETUPTOOLS_SETUP_PATH} |
| 15 | NO_FETCH_BUILD=1 \ |
| 16 | STAGING_INCDIR=${STAGING_INCDIR} \ |
| 17 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
| 18 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 19 | bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 20 | bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed." |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 21 | } |
| 22 | setuptools3_do_compile[vardepsexclude] = "MACHINE" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 23 | do_compile[cleandirs] += "${PEP517_WHEEL_PATH}" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 24 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 25 | # This could be removed in the future but some recipes in meta-oe still use it |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 26 | setuptools3_do_install() { |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 27 | python_pep517_do_install |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 28 | } |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 29 | |
| 30 | EXPORT_FUNCTIONS do_configure do_compile do_install |
| 31 | |
| 32 | export LDSHARED="${CCLD} -shared" |