← Back to team overview

savoirfairelinux-openerp team mailing list archive

Re: [Merge] lp:~savoirfairelinux-openerp/lp-community-utils/pep394 into lp:lp-community-utils

 

Ronald, I cannot replicate the behaviour:

scarter ~ % virtualenv --version
1.11.2
scarter ~ % python -c "import sys; print(sys.prefix); print(sys.version)"
/usr
3.3.3 (default, Nov 26 2013, 13:33:18) 
[GCC 4.8.2]
scarter ~ % python2 -c "import sys; print(sys.prefix); print(sys.version)"
/usr
2.7.6 (default, Nov 26 2013, 12:52:49) 
[GCC 4.8.2]
scarter ~ % /usr/bin/env python -c "import sys; print(sys.prefix); print(sys.version)"
/usr
3.3.3 (default, Nov 26 2013, 13:33:18) 
[GCC 4.8.2]
scarter ~ % /usr/bin/env python2 -c "import sys; print(sys.prefix); print(sys.version)"
/usr
2.7.6 (default, Nov 26 2013, 12:52:49) 
[GCC 4.8.2]
scarter ~ % virtualenv --python=python2.7 test_usr_bin_env
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in test_usr_bin_env/bin/python2.7
Also creating executable in test_usr_bin_env/bin/python
Installing setuptools, pip...done.
scarter ~ % . test_usr_bin_env/bin/activate
(test_usr_bin_env)scarter ~ % python -c "import sys; print(sys.prefix); print(sys.version)"
/home/scarter/test_usr_bin_env
2.7.6 (default, Nov 26 2013, 12:52:49) 
[GCC 4.8.2]
(test_usr_bin_env)scarter ~ % python2 -c "import sys; print(sys.prefix); print(sys.version)"
/home/scarter/test_usr_bin_env
2.7.6 (default, Nov 26 2013, 12:52:49) 
[GCC 4.8.2]
(test_usr_bin_env) scarter ~ % /usr/bin/env python -c "import sys; print(sys.prefix); print(sys.version)"
/home/scarter/test_usr_bin_env
2.7.6 (default, Nov 26 2013, 12:52:49) 
[GCC 4.8.2]
(test_usr_bin_env)scarter ~ % /usr/bin/env python2 -c "import sys; print(sys.prefix); print(sys.version)"
/home/scarter/test_usr_bin_env
2.7.6 (default, Nov 26 2013, 12:52:49) 
[GCC 4.8.2]
(test_usr_bin_env)scarter ~ % deactivate

Whether or not we use /usr/bin/env or not doesn't really matter to me. Most of the shebangs in this MP don't even use it. I am just following the official specifications of PEP394.
What matters to me is python2 over python.
A script should not expect the user to change the /usr/bin/python symlink.
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/lp-community-utils/pep394/+merge/204535
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/lp-community-utils/pep394.


References