Bug 995284 - virtualenv 1.7.2 is buggy, please upgrade to 1.10.1
virtualenv 1.7.2 is buggy, please upgrade to 1.10.1
Status: CLOSED ERRATA
Product: Red Hat Software Collections
Classification: Red Hat
Component: python-virtualenv (Show other bugs)
python27
Unspecified Unspecified
unspecified Severity high
: rc
: 1.0
Assigned To: Robert Kuska
Lukas Zachar
: Rebase
Depends On:
Blocks: 997388
  Show dependency treegraph
 
Reported: 2013-08-08 20:51 EDT by Rob Millner
Modified: 2016-04-18 06:16 EDT (History)
4 users (show)

See Also:
Fixed In Version: python27-python-virtualenv-1.10.1-2.el6
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of:
: 995549 997388 (view as bug list)
Environment:
Last Closed: 2013-09-10 02:41:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
python-virtualenv specfile for 1.10.1 (6.48 KB, text/x-rpm-spec)
2013-08-09 01:08 EDT, Rob Millner
no flags Details

  None (edit)
Description Rob Millner 2013-08-08 20:51:30 EDT
Description of problem:
virtualenv 1.7.2 does not create the python2 and python27 symlinks to python.  This causes scripts to be broken after "virtenv --relocatable" is run.

Version-Release number of selected component (if applicable):
virtualenv 1.7.2

How reproducible:
Always

Steps to Reproduce:
1. virtualenv --system-site-packages /path/to/virtenv
2. virtualenv --relocatable /path/to/virtenv

Actual results:
There is no python27 in the virualenv, but scripts refer to it.

Expected results:
There are two symlinks:
python2 -> python
python27 -> python

Additional info:

It appears that this is due to a whitespace error in the code.
Comment 2 Rob Millner 2013-08-09 01:08:38 EDT
Created attachment 784718 [details]
python-virtualenv specfile for 1.10.1
Comment 3 Rob Millner 2013-08-09 01:10:33 EDT
Went ahead and built for the latest version, specfile attached.
Comment 4 Stanislav Ochotnicky 2013-08-09 08:31:00 EDT
(In reply to Rob Millner from comment #3)
> Went ahead and built for the latest version, specfile attached.

With regards to current buggy version. I would assume that there is a workaround in the sense that those symlinks can be created manually after running virtualenv. Correct?
Comment 5 Rob Millner 2013-08-09 12:36:42 EDT
Correct - they can easily be created.
Comment 6 Stanislav Ochotnicky 2013-08-09 12:53:07 EDT
OK, due to existing workaround and GA getting close we'll move this to RHSCL 1.1. Going to clone this bug for release notes so that this is properly documented in the meantime.
Comment 7 Stanislav Ochotnicky 2013-08-09 13:22:42 EDT
Actually had a closer look...

Before runnning "virtualenv --relocatable" shebangs look like this:
#!/path/to/virtenv/bin/python

After running "--relocatable" shebangs get changed to:
#!/usr/bin/env python2.7

If you are inside scl-enabled environment the above shebang will correctly run python2.7 from PATH (which will be modified to include /opt/rh/python27/root/usr/bin/). Outside scl python library would not be resolved by linker either way.

Even if symlinks are manually created, they are not used by #!/usr/bin/env python2.7

Am I missing something?
Comment 8 Rob Millner 2013-08-12 23:36:18 EDT
The virtual environment has an "activate" script that puts it at the front of PATH, causing python2.7 and python2 to be resolved inside of it.
Comment 11 Robert Kuska 2013-08-16 05:25:26 EDT
I have updated source to 1.10.1.
Comment 18 errata-xmlrpc 2013-09-10 02:41:47 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1238.html

Note You need to log in before you can comment on or make changes to this bug.