Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#61819 - [root] missing entry in PYTHONPATH
Attached to Project:
Community Packages
Opened by Sebastien Binet (bins) - Wednesday, 20 February 2019, 14:16 GMT
Last edited by Konstantin Gizdov (kgizdov) - Saturday, 23 February 2019, 17:28 GMT
Opened by Sebastien Binet (bins) - Wednesday, 20 February 2019, 14:16 GMT
Last edited by Konstantin Gizdov (kgizdov) - Saturday, 23 February 2019, 17:28 GMT
|
DetailsDescription:
ROOT-6.16/00 is now (?) installing python modules for rootls and friends under /usr/share/root/cli: ``` $> yay -Ql root | grep cmdLine root /usr/share/root/cli/__pycache__/cmdLineUtils.cpython-37.pyc root /usr/share/root/cli/cmdLineUtils.py ``` one should add that directory to the PYTHONPATH otherwise: ``` $> rootls Traceback (most recent call last): File "/usr/bin/rootls", line 10, in <module> import cmdLineUtils ModuleNotFoundError: No module named 'cmdLineUtils' ``` ``` $> yay -Qi root Name : root Version : 6.16.00-1 Description : C++ data analysis framework and interpreter from CERN. Architecture : x86_64 URL : http://root.cern.ch Licenses : LGPL2.1 Groups : None Provides : root-extra Depends On : blas desktop-file-utils fcgi fftw ftgl giflib gl2ps glew gsl hicolor-icon-theme intel-tbb libafterimage librsvg libxpm tex-gyre-fonts xxhash>=0.6.5-1 Optional Deps : cfitsio: Read images and data from FITS files [installed] cern-vdt: Add a set of fast and vectorisable mathematical functions [installed] libmariadbclient: MySQL support [installed] openssl: OpenSSL support [installed] postgresql-libs: PostgreSQL support [installed] pythia8>=8.2.40-1: Pythia8 EG support sqlite: SQLite support [installed] tcsh: Legacy CSH support unuran: Support non-uniform random numbers [installed] vc: Add types for portable and intuitive SIMD programming libxml2: XML parser interface [installed] xrootd: Support remote file server and client [installed] gcc-fortran: Enable the Fortran components of ROOT [installed] Required By : None Optional For : None Conflicts With : root-extra Replaces : root-extra Installed Size : 306.74 MiB Packager : Konstantin Gizdov <arch@kge.pw> Build Date : Tue 19 Feb 2019 12:35:58 PM CET Install Date : Tue 19 Feb 2019 03:48:39 PM CET Install Reason : Explicitly installed Install Script : No Validated By : Signature ``` |
This task depends upon
Closed by Konstantin Gizdov (kgizdov)
Saturday, 23 February 2019, 17:28 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in pkgrel 2
Saturday, 23 February 2019, 17:28 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in pkgrel 2
The PKGBUILD could be adjusted to place the python files in the standard location using the same approach as fedora.
Having 974 files in etc/root seems none standard to me.
/etc/profile.d/root.sh is being sourced, but here is its current content:
```
if [ $PYTHONPATH ]; then
if [[ ":$PYTHONPATH:" == *":/usr/lib/root:"* ]]; then
return 0;
else
export PYTHONPATH=$PYTHONPATH:/usr/lib/root;
fi
else
export PYTHONPATH=/usr/lib/root;
fi
```
it worked fine previously (with ROOT-6.14/xx, when the "root" package was in AUR.)
but now, with ROOT-6.16/xx, there are additional python files there:
```
/usr/share/root/cli/__pycache__/cmdLineUtils.cpython-37.pyc
/usr/share/root/cli/cmdLineUtils.py
```
so either /etc/profile.d/root.sh needs to be updated to add /usr/share/root/cli to the PYTHONPATH, or we somehow tweak PKGBUILD to beat ROOT into installing these files under /usr/lib/root.
There is no beating ROOT here, we would need to beat the package maintainer (or at least ask why this change was made).
This is what the PKGBUILD does:
mv "${pkgdir}/usr/lib/root"/cmdLineUtils.py* "${pkgdir}/usr/share/root/cli/"
rm "${pkgdir}/usr/lib/root/__pycache__"/cmdLineUtils.*
python -m compileall "${pkgdir}/usr/share/root/cli/"
In any case, this is a bug. For the time being, I will move everything back in `/usr/lib/root`.
Also, ROOT doesn't try/want to install python modules in the standard python path at all. And on top of that the dynamic loading of libs doesn't help with moving files around. Thus the need for `/etc/profile.d/root.sh`. However, stuff is being done to remove this as well.