blob: 556bc801af71cf8fe3b1f5c1db498ccc52dd7a22 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001inherit setuptools3-base python_pep517
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003# bdist_wheel builds in ./dist
4#B = "${WORKDIR}/build"
Andrew Geissler595f6302022-01-24 19:11:47 +00005
6SETUPTOOLS_BUILD_ARGS ?= ""
Andrew Geissler595f6302022-01-24 19:11:47 +00007
8SETUPTOOLS_SETUP_PATH ?= "${S}"
9
10setuptools3_do_configure() {
11 :
12}
13
14setuptools3_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 Geissler9aee5002022-03-30 16:27:02 +000020 bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000021 bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
Andrew Geissler595f6302022-01-24 19:11:47 +000022}
23setuptools3_do_compile[vardepsexclude] = "MACHINE"
Andrew Geissler9aee5002022-03-30 16:27:02 +000024do_compile[cleandirs] += "${PEP517_WHEEL_PATH}"
Andrew Geissler595f6302022-01-24 19:11:47 +000025
26setuptools3_do_install() {
Andrew Geissler9aee5002022-03-30 16:27:02 +000027 python_pep517_do_install
Andrew Geissler595f6302022-01-24 19:11:47 +000028}
Andrew Geissler595f6302022-01-24 19:11:47 +000029
30EXPORT_FUNCTIONS do_configure do_compile do_install
31
32export LDSHARED="${CCLD} -shared"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000033DEPENDS += "python3-setuptools-native python3-wheel-native"