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 | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 3 | # bdist_wheel builds in ./dist |
| 4 | #B = "${WORKDIR}/build" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5 | |
| 6 | SETUPTOOLS_BUILD_ARGS ?= "" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7 | |
| 8 | SETUPTOOLS_SETUP_PATH ?= "${S}" |
| 9 | |
| 10 | setuptools3_do_configure() { |
| 11 | : |
| 12 | } |
| 13 | |
| 14 | setuptools3_do_compile() { |
| 15 | cd ${SETUPTOOLS_SETUP_PATH} |
| 16 | NO_FETCH_BUILD=1 \ |
| 17 | STAGING_INCDIR=${STAGING_INCDIR} \ |
| 18 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
| 19 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 20 | bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 21 | 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] | 22 | } |
| 23 | setuptools3_do_compile[vardepsexclude] = "MACHINE" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 24 | do_compile[cleandirs] += "${PEP517_WHEEL_PATH}" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 25 | |
| 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" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 33 | DEPENDS += "python3-setuptools-native python3-wheel-native" |