xref: /OK3568_Linux_fs/yocto/poky/meta/classes/setuptools3.bbclass (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyuninherit setuptools3-base python_pep517
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun# bdist_wheel builds in ./dist
4*4882a593Smuzhiyun#B = "${WORKDIR}/build"
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunSETUPTOOLS_BUILD_ARGS ?= ""
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSETUPTOOLS_SETUP_PATH ?= "${S}"
9*4882a593Smuzhiyun
10*4882a593Smuzhiyunsetuptools3_do_configure() {
11*4882a593Smuzhiyun    :
12*4882a593Smuzhiyun}
13*4882a593Smuzhiyun
14*4882a593Smuzhiyunsetuptools3_do_compile() {
15*4882a593Smuzhiyun        cd ${SETUPTOOLS_SETUP_PATH}
16*4882a593Smuzhiyun        NO_FETCH_BUILD=1 \
17*4882a593Smuzhiyun        STAGING_INCDIR=${STAGING_INCDIR} \
18*4882a593Smuzhiyun        STAGING_LIBDIR=${STAGING_LIBDIR} \
19*4882a593Smuzhiyun        ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
20*4882a593Smuzhiyun        bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \
21*4882a593Smuzhiyun        bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
22*4882a593Smuzhiyun}
23*4882a593Smuzhiyunsetuptools3_do_compile[vardepsexclude] = "MACHINE"
24*4882a593Smuzhiyundo_compile[cleandirs] += "${PEP517_WHEEL_PATH}"
25*4882a593Smuzhiyun
26*4882a593Smuzhiyunsetuptools3_do_install() {
27*4882a593Smuzhiyun        python_pep517_do_install
28*4882a593Smuzhiyun}
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunEXPORT_FUNCTIONS do_configure do_compile do_install
31*4882a593Smuzhiyun
32*4882a593Smuzhiyunexport LDSHARED="${CCLD} -shared"
33*4882a593SmuzhiyunDEPENDS += "python3-setuptools-native python3-wheel-native"
34