Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | inherit setuptools3-base python_pep517 |
| 8 | |
| 9 | DEPENDS += "python3-setuptools-native python3-wheel-native" |
| 10 | |
| 11 | SETUPTOOLS_BUILD_ARGS ?= "" |
| 12 | |
| 13 | SETUPTOOLS_SETUP_PATH ?= "${S}" |
| 14 | |
| 15 | setuptools3_do_configure() { |
| 16 | : |
| 17 | } |
| 18 | |
| 19 | setuptools3_do_compile() { |
| 20 | cd ${SETUPTOOLS_SETUP_PATH} |
| 21 | NO_FETCH_BUILD=1 \ |
| 22 | STAGING_INCDIR=${STAGING_INCDIR} \ |
| 23 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 24 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 25 | bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \ |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 26 | bbfatal_log "'python3 setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed." |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 27 | } |
| 28 | setuptools3_do_compile[vardepsexclude] = "MACHINE" |
| 29 | do_compile[cleandirs] += "${PEP517_WHEEL_PATH}" |
| 30 | |
| 31 | # This could be removed in the future but some recipes in meta-oe still use it |
| 32 | setuptools3_do_install() { |
| 33 | python_pep517_do_install |
| 34 | } |
| 35 | |
| 36 | EXPORT_FUNCTIONS do_configure do_compile do_install |
| 37 | |
| 38 | export LDSHARED="${CCLD} -shared" |