diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2021-04-06 12:25:20 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2021-04-07 09:16:30 +0200 |
commit | 62ea63f292e0ae70dc668a2cf14c2e6e8c1e9acc (patch) | |
tree | c740752d88fb6d7a33ef6b7e50fd22a8ea55635a | |
parent | 81025d138d818b8af10864d49ecd72cff5f3cd72 (diff) | |
download | meta-python2-62ea63f292e0ae70dc668a2cf14c2e6e8c1e9acc.tar.gz |
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 <Martin.Jansa@gmail.com>
-rw-r--r-- | recipes-devtools/python/python-pyrex_0.9.9.bb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-devtools/python/python-pyrex_0.9.9.bb b/recipes-devtools/python/python-pyrex_0.9.9.bb index c4dd2e6..aaf2c54 100644 --- a/recipes-devtools/python/python-pyrex_0.9.9.bb +++ b/recipes-devtools/python/python-pyrex_0.9.9.bb @@ -19,4 +19,4 @@ 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" |