Welcome to CRUX bug tracking.

FS#975 - Python Ports and VirtualEnv

Attached to Project: CRUX
Opened by James Mills (prologic) - Tuesday, 28 January 2014, 01:35 GMT
Task Type Improvement
Category ports
Status New
Assigned To No-one
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


NB: This only affects uses of CRUX who happen to be Python Developers and utilize virtualenv everywhere. Namely me afaik :)

Most CRUX Python Port(s) I've seen do something like this in their Pkgfile(s):

python ...

Under "normal circumstances" this is fine.

If you use virtualenv's like I do everywhere then this does not work.
The resulting shebangs become (for example): #!/home/prologic/bin/python
or worse #!/home/prologic/.virtualenvs/foo/bin/python

What needs to happen here going forward
(and I'll probably document this in the WIki)

/usr/bin/python setup ...

NB: "python". not "python2" or anything else.


This ensures that the "system" python is execute for building the python package.
We do not need to worry about the whole Python2 vs. Python3 problem that Arch and others do.
Why? No-one uses Python3 (really) in practise. It still has a long way to go... "/usr/bin/python" __should__
always be the "system python" and should remain Python2 anyway.

This task depends upon

Comment by Danny Rawlins (Romster) - Sunday, 25 September 2016, 10:49 GMT
I've implemented this change in the Pkgfiles I maintain

Comment by Tim Biermann (tb) - Saturday, 22 August 2020, 14:40 GMT
Is this still relevant with the recent changes towards python3?
Comment by Tim Biermann (tb) - Tuesday, 03 November 2020, 22:12 GMT
I updated all my ports in contrib (3.5 branch) to use /usr/bin/python3 today
Comment by Tim Biermann (tb) - Wednesday, 27 January 2021, 23:04 GMT
This should be okay to be closed, right? I think most if not all python ports do that now.