blob: 66c94660d8e1d7d3b0559efe8c9b7e47dac55d8b [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001inherit setuptools3-base python_pep517
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002
Andrew Geissler78b72792022-06-14 06:47:25 -05003DEPENDS += "python3-setuptools-native python3-wheel-native"
Andrew Geissler595f6302022-01-24 19:11:47 +00004
5SETUPTOOLS_BUILD_ARGS ?= ""
Andrew Geissler595f6302022-01-24 19:11:47 +00006
7SETUPTOOLS_SETUP_PATH ?= "${S}"
8
9setuptools3_do_configure() {
10 :
11}
12
13setuptools3_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 Geissler9aee5002022-03-30 16:27:02 +000019 bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000020 bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
Andrew Geissler595f6302022-01-24 19:11:47 +000021}
22setuptools3_do_compile[vardepsexclude] = "MACHINE"
Andrew Geissler9aee5002022-03-30 16:27:02 +000023do_compile[cleandirs] += "${PEP517_WHEEL_PATH}"
Andrew Geissler595f6302022-01-24 19:11:47 +000024
Andrew Geissler78b72792022-06-14 06:47:25 -050025# This could be removed in the future but some recipes in meta-oe still use it
Andrew Geissler595f6302022-01-24 19:11:47 +000026setuptools3_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"