FS#59997 - [python-gobject] fix compileall to not reference BUILDDIR
Attached to Project:
Arch Linux
Opened by userwithuid (userwithuid) - Sunday, 09 September 2018, 13:09 GMT
Last edited by Jan Alexander Steffens (heftig) - Saturday, 15 September 2018, 20:24 GMT
Opened by userwithuid (userwithuid) - Sunday, 09 September 2018, 13:09 GMT
Last edited by Jan Alexander Steffens (heftig) - Saturday, 15 September 2018, 20:24 GMT
|
Details
The well-known "WARNING: Package contains reference to
$pkgdir"
For manual compilation, you use: python -m compileall "$pkgdir/usr/lib" python -O -m compileall "$pkgdir/usr/lib" which leaves this string in the pyc (/build being your BUILDDIR): ----- /build/pygobject/pkg/python-gobject/usr/lib/python3.7/site-packages/gi/module.py ----- This could be fixed by switching to something like this: pushd "$pkgdir" python -m compileall . python -O -m compileall . popd which would make the string look like this: ----- ./usr/lib/python3.7/site-packages/gi/module.py ----- For reference, with setuptools --root="$pkgdir" as used in most python-* PKGBUILDs the string looks like this (same except for the leading dot): ----- /usr/lib/python3.7/site-packages/gi/module.py ----- This pattern is used in other PKGBUILDs as well, but I thought I'd mention it for a specific example first. :-) |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Saturday, 15 September 2018, 20:24 GMT
Reason for closing: Fixed
Additional comments about closing: python 3.7.0-4
pygobject 3.30.1-3
Saturday, 15 September 2018, 20:24 GMT
Reason for closing: Fixed
Additional comments about closing: python 3.7.0-4
pygobject 3.30.1-3
pushd "$pkgdir"
python -m compileall -d / usr/lib
python -O -m compileall -d / usr/lib
popd
"/module.py" for gi/module.py
"/keysyms.py" for gi/overrides/keysyms.py
Intentional?
This should be right:
python -m compileall -d /usr/lib "$pkgdir/usr/lib"
python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
However, python3's compileall is buggy and does not properly handle the -d when recursing. This needs to be fixed.