From b744c3805f1e3c04a620287fea80cbcdd9754bb3 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Tue, 6 Apr 2021 12:25:20 +0200 Subject: python-pyrex: fix installed-vs-shipped QA issue with usrmerge * fixes: ERROR: python-pyrex-0.9.9-r4 do_package: QA Issue: python-pyrex: Files/directories were installed but not shipped in any package: /usr/share /usr/share/lib /usr/share/lib/python2.7 /usr/share/lib/python2.7/site-packages /usr/share/lib/python2.7/site-packages/Pyrex /usr/share/lib/python2.7/site-packages/Pyrex/Compiler /usr/share/lib/python2.7/site-packages/Pyrex/Compiler/Lexicon.pickle Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. python-pyrex: 7 installed and not shipped files. [installed-vs-shipped] ERROR: python-pyrex-0.9.9-r4 do_package: Fatal QA errors found, failing task. * base_libdir becames /usr/lib with usrmerge in DISTRO_FEATURES: # $base_libdir [4 operations] # exported /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:26 # [export] "1" # set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:26 # "${root_prefix}/${baselib}" # override[native]:set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:62 # "/lib" # override[nativesdk]:set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:73 # "/lib" # pre-expansion value: # "${root_prefix}/${baselib}" export base_libdir="/usr/lib" # $root_prefix # set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:21 # "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '${exec_prefix}', '${base_prefix}', d)}" root_prefix="/usr" * but pyrex setup.py is using get_python_lib from distutils.sysconfig and that doesn't get changed to /usr/lib prefix: data_files=[ (compiler_dir, ['Pyrex/Compiler/Lexicon.pickle']) ] compiler_dir = os.path.join(get_python_lib(prefix=''), 'Pyrex', 'Compiler') >>> from distutils.sysconfig import get_python_lib >>> print(get_python_lib(prefix='')) lib/python2.7/dist-packages * python3 is also using baselib meta/recipes-devtools/python/python3_3.9.2.bb:EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}" meta/recipes-devtools/python/python3_3.9.2.bb: LIB=${baselib} \ meta-oe/recipes-extended/mraa/mraa_git.bb: -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages in python2 it seems to implement the same but through libdirleaf dropping ${prefix}/ recipes-devtools/python/python.inc: libdirleaf="$(echo ${libdir} | sed -e 's:${prefix}/::')" recipes-devtools/python/python.inc: sed -i -e "s:SEDMELIBLEAF:${libdirleaf}:g" \ before that it was using "basename ${libdir}" https://git.openembedded.org/openembedded-core/commit/?id=c61c416a6504f7e8885df3c94c839d1031920a1c Signed-off-by: Martin Jansa --- recipes-devtools/python/python-pyrex_0.9.9.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/python/python-pyrex_0.9.9.bb b/recipes-devtools/python/python-pyrex_0.9.9.bb index 3df784f..51786df 100644 --- a/recipes-devtools/python/python-pyrex_0.9.9.bb +++ b/recipes-devtools/python/python-pyrex_0.9.9.bb @@ -19,6 +19,6 @@ S = "${WORKDIR}/${SRCNAME}-${PV}" inherit distutils -FILES_${PN} += "${datadir}${base_libdir}/${PYTHON_DIR}/site-packages/Pyrex/Compiler/Lexicon.pickle" +FILES_${PN} += "${datadir}${baselib}/${PYTHON_DIR}/site-packages/Pyrex/Compiler/Lexicon.pickle" PNBLACKLIST[python-pyrex] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}" -- cgit 1.2.3-korg