Description of problem: virtualenv --relocatable is creating scripts with a bad shebang (e.g. "2.4"). This is caused by a bad sed call in the spec file that replaces all occurences of "#!/usr/bin/env python" with an empty string. This replacement should only happen on the first line of virtualenv.py Version-Release number of selected component (if applicable): 1.4.3-2 How reproducible: Always Steps to Reproduce: 1. virtualenv ve 2. virtualenv --relocatable ve 3. head ve/bin/easy_install Actual results: "2.4" Expected results: "#/usr/bin/env python2.4" Additional info: The file as installed by EPEL vs. upstream: diff -u /usr/lib/python2.4/site-packages/virtualenv.py egg/virtualenv-1.4.9-py2.4.egg/virtualenv.py --- /usr/lib/python2.4/site-packages/virtualenv.py 2010-06-07 11:49:16.000000000 +0200 +++ egg/virtualenv-1.4.9-py2.4.egg/virtualenv.py 2010-06-07 11:20:05.000000000 +0200 @@ -1,4 +1,4 @@ - +#!/usr/bin/env python """Create a "virtual" Python installation """ @@ -937,7 +937,7 @@ # This is what we expect at the top of scripts: shebang = '#!%s/bin/python' % os.path.normcase(os.path.abspath(home_dir)) # This is what we'll put: - new_shebang = '%s' % sys.version[:3] + new_shebang = '#!/usr/bin/env python%s' % sys.version[:3] activate = "import os; activate_this=os.path.join(os.path.dirname(__file__), 'activate_this.py'); execfile(activate_this, dict(__file__=activate_this)); del os, activate_this" bin_dir = os.path.join(home_dir, 'bin') for filename in os.listdir(bin_dir): @@ -1104,8 +1104,8 @@ script from that package. If you provide something like ``python_version='2.4'`` then the - script will start with ``2.4`` instead of - ````. You can use this when the script must + script will start with ``#!/usr/bin/env python2.4`` instead of + ``#!/usr/bin/env python``. You can use this when the script must be run with a particular Python version. """ filename = __file__
Created attachment 421784 [details] Patch to the spec file (includes 1.4.9 upgrade, sorry)
Thanks, I'll take a look today.
Applied the sed change and verified that relocatable works as you would expect it to based on info from this ticket. There seems to currently be a dep problem in rawhide (unrelated to the package). Once that is resolved I'll send it through rawhide and to dist testing repos.
Side note, I have not upgraded the package to 1.4.9 yet as there seems to be a descrepency on versions: 1.4.9: http://pypi.python.org/pypi/virtualenv 1.4.8: http://bitbucket.org/ianb/virtualenv (http://bitbucket.org/ianb/virtualenv/issue/44/pypi-version-bitbucket-openplans-version)
python-virtualenv-1.4.8-2.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.fc13
python-virtualenv-1.4.8-2.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.fc12
python-virtualenv-1.4.8-2.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.el5
python-virtualenv-1.4.8-2.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.fc11
python-virtualenv-1.4.8-2.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-virtualenv'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.fc13
python-virtualenv-1.4.8-2.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-virtualenv'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.fc12
python-virtualenv-1.4.8-2.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-virtualenv'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.fc11
python-virtualenv-1.4.8-2.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-virtualenv'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-virtualenv-1.4.8-2.el5
python-virtualenv-1.4.8-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
python-virtualenv-1.4.8-2.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
python-virtualenv-1.4.8-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.