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#19114 - [openoffice-base] profile modifies Python behaviour
Attached to Project:
Arch Linux
Opened by Hervé (herve) - Thursday, 15 April 2010, 14:21 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 01 June 2010, 10:08 GMT
Opened by Hervé (herve) - Thursday, 15 April 2010, 14:21 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 01 June 2010, 10:08 GMT
|
DetailsDescription:
The profile script "openoffice.sh" modifies the Python path: export PYTHONPATH=$PYTHONPATH:/usr/lib/openoffice/basis-link/program/ But when PYTHONPATH is empty, this results in: :/usr/lib/openoffice/basis-link/program/ That empty entry makes Python always add the current working directory to the path: ~ $ python -c "import os, sys; print os.getcwd() in sys.path" True ~ $ cd /tmp /tmp $ python -c "import os, sys; print os.getcwd() in sys.path" True This provokes side effects when there's a module in the current working directory whose name conflicts with a module in the standard library: Traceback (most recent call last): File "../bin/ipkg-build.py", line 30, in <module> import itools.gettext File "/home/herve/Itaapy/LpOD/lib/python2.6/site-packages/itools/gettext/__init__.py", line 22, in <module> from mo import MOFile File "/home/herve/Itaapy/LpOD/lib/python2.6/site-packages/itools/gettext/mo.py", line 19, in <module> from gettext import GNUTranslations File "/home/herve/Itaapy/LpOD/itools--lpod/gettext/__init__.py", line 22, in <module> from mo import MOFile File "/home/herve/Itaapy/LpOD/itools--lpod/gettext/mo.py", line 19, in <module> from gettext import GNUTranslations ImportError: cannot import name GNUTranslations Inside my "gettext" package, I import "gettext" from the standard library, but then it's just trying to import itself again. If I remove the ":", it works as expected: $ export PYTHONPATH=/usr/lib/openoffice/basis-link/program/ So my suggestion is not to reuse $PYTHONPATH if not defined. Additional info: * package version(s) 3.2.0-3 |
This task depends upon
export PYTHONPATH=/usr/lib/openoffice/basis-link/program/:$PYTHONPATH