Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace packages and bin directory replaced by latest package when PIP_TARGET is set #700

Closed
anki-code opened this issue Mar 1, 2020 · 5 comments

Comments

@anki-code
Copy link

anki-code commented Mar 1, 2020

Hello!

While I'm working on xxh/xxh I've faced with issue around PIP_TARGET environment variable and namespace packages.

When I set PIP_TARGET and then try to install group of subpackages then every new package just replace the latest.

For example there are two packages xonda and xontrib-autojump. Every package has namespace xontrib. If I install every package without setting PIP_TARGET I'll see in site-packages one directory xontrib with two files xonda.xsh and autojump.xsh.

But if I set PIP_TARGET:

# mkdir -p /home/pc/ppp
# export PIP_TARGET='/home/pc/ppp'
# pip install xonda
Successfully installed xonda-0.9.0
# ls /home/pc/ppp/xontrib/
xonda.xsh

# pip install xontrib-autojump
WARNING: Target directory /home/pc/ppp/xontrib already exists. Specify --upgrade to force replacement.
# ls /home/pc/ppp/xontrib/
xonda.xsh

# pip install --upgrade xontrib-autojump
Successfully installed xontrib-autojump-1.2
# ls /home/pc/ppp/xontrib/
autojump.xsh
$ pip --version                                                                                                                                                                                                                        
pip 20.0.2

As you can see the new package will just replace previous in xontrib directory instead of saving namespace.

Thank you for response and advices!

@anki-code
Copy link
Author

anki-code commented Apr 19, 2020

The issue is also actual to $PIP_TARGET/bin directory. If we install two packages with executed files the latest package will replace bin directory.

@anki-code anki-code changed the title Namespace packages is not working when PIP_TARGET is set Namespace packages and bin directory replaced by latest package when PIP_TARGET is set Apr 19, 2020
@anki-code
Copy link
Author

anki-code commented Apr 19, 2020

Almost 2 months passed. @brainwane @techalchemy @uranusjr could you please help? May be I'm doing this wrong way...

@uranusjr
Copy link
Member

No idea why you’re tagging me but this sounds similar to pypa/pip#5178.

@anki-code
Copy link
Author

anki-code commented Apr 19, 2020

@uranusjr sorry for mention I just don't know who is the right person and thank you for the link! I've found some thoughts! I'm going to rewrite the code to use $PYTHONUSERBASE.

@pradyunsg
Copy link
Member

@anki-code Thanks for filing this issue but I'm afraid this is the wrong place for such support requests.

If you're still facing issues, I think that python-list or python-tutor mailing lists, or #python on Freenode (IRC) would be better channels to get support for the issue you're facing.

Thanks for understanding!

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

No branches or pull requests

3 participants