Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

python setup.py install --user breaks behaviour of other setups. #171

Open
srgvg opened this issue Jan 22, 2016 · 0 comments
Open

python setup.py install --user breaks behaviour of other setups. #171

srgvg opened this issue Jan 22, 2016 · 0 comments

Comments

@srgvg
Copy link

srgvg commented Jan 22, 2016

I installed gandi.cli from the repo code (python setup.py install --user) today, as I got bitten by some bugs in 0.16. It seems this had the side effect of updating following file with following content:

~  cat ./.local/lib/python2.7/site-packages/easy-install.pth
import sys; sys.__plen = len(sys.path)
./gandi.cli-0.16-py2.7.egg
/usr/lib/python2.7/dist-packages
import sys; new = sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p = getattr(sys, '__egginsert', 0); sys.path[p:p] = new; sys.__egginsert = p + len(new)

Which breaks at least one script where I need a particular directory added to PYTHONPATH, whilst it at run time gets prepended by the dirs added by the gandi.cli setup:

~  echo $PYTHONPATH
/home/serge/src/ansible/ansible/lib:
~ python
>>> import sys; print(sys.path) 
['', '/home/serge/.local/lib/python2.7/site-packages/gandi.cli-0.16-py2.7.egg', '/usr/lib/python2.7/dist-packages', '/home/serge/src/ansible/ansible/lib', '/home/serge', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/serge/.local/lib/python2.7/site-packages', '/home/serge/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']

Is this apparent cause indeed related to my sys.path problem, and did I do something wrong here, or is this a problem with with the gandi.cli setup?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant