gobolinux / Scripts

The GoboLinux scripts collection
41 stars 9 forks source link

Alien pip3 support #23

Open AitorATuin opened 7 years ago

AitorATuin commented 7 years ago

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 commented 7 years ago

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.

hishamhm commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Sure I will implement the stuff I the other thread as well but please read my response.

Regarding PYTHONPATH in think it should work but I will test anyway

El jue., 13 jul. 2017 23:30, Hisham Muhammad notifications@github.com escribió:

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?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gobolinux/Scripts/pull/23#issuecomment-315207581, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrR3y7dYMDroEEBSLTrF3KgJNL1s8gIks5sNoxYgaJpZM4OSDoZ .

lucasvr commented 4 years ago

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?