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

Alien pip3 support #23

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

AitorATuin
Copy link
Contributor

This PR adds a new namespace PIP3.
With this PR we should be able to specify pip3 dependencies like this: PIP3:package.
It also makes getinstallversion to return the latest version, it was returning the oldest version before.

@AitorATuin
Copy link
Contributor Author

AitorATuin commented Jul 9, 2017

Using StrictVersion to compare release versions is failing in a big number of cases with the current algorithm.
Using LooseVersion which relaxes the version format fails in some packages due to a bug (tested the failure in numpy) https://bugs.python.org/issue14894
I included in the PR a commit that adds support for PEP440 (https://www.python.org/dev/peps/pep-0440/) to deal with the versions.

Propagate the error to the top level script so we can use it to check
for installed versions
@AitorATuin AitorATuin changed the title Alien pip3 support WIP - Alien pip3 support Jul 9, 2017
@AitorATuin AitorATuin changed the title WIP - Alien pip3 support Alien pip3 support Jul 11, 2017
@hishamhm
Copy link
Member

If we're defining a namespace called PIP3, then maybe we should install it under /System/Aliens/PIP3? So that the namespace in all three places match (<namespace>:dependency x.y in the Dependencies file; Alien-<namespace>, and /System/Aliens/<namespace>).

@lucasvr
Copy link
Member

lucasvr commented Jul 13, 2017

@hishamhm that makes total sense. Note that, currently, our Python 3 package (3.6.0, at least) installs aliens under /Programs/Python/3.6.0/lib. That's a bug in the recipe, for sure, but this is a good opportunity to get both things fixed/changed.

@AitorATuin
Copy link
Contributor Author

If we're defining a namespace called PIP3, then maybe we should install it under /System/Aliens/PIP3

Yes, that makes sense, I will add it. This fixes also the problem of binaries going to the same place in both pip versions.

That's a bug in the recipe, for sure, but this is a good opportunity to get both things fixed/changed.

I have a local version that does not apply any patch to the python source, so the paths are managed via PYTHONPATH and Alien-PIPn. The only problem i can see it's when calling sudo pip, then by default everything is going into Programs/Pythion I guess.

@hishamhm
Copy link
Member

Yes, that makes sense, I will add it. This fixes also the problem of binaries going to the same place in both pip versions.

Please check also my proposal in the other thread. Might be an alternate way to solve the problem.

The only problem i can see it's when calling sudo pip, then by default everything is going into Programs/Python I guess.

If PYTHONPATH is set in /System/Environment even root will get it. Wouldn't this be sufficient?

@AitorATuin
Copy link
Contributor Author

AitorATuin commented Jul 13, 2017 via email

@lucasvr
Copy link
Member

lucasvr commented Jan 14, 2020

Guys, I totally forgot about this PR and ended up implementing support for PIP3 a while back -- sorry about that :-(
@AitorATuin, could you check if there's anything missing in the master branch that you'd like to see merged?

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

Successfully merging this pull request may close these issues.

3 participants