This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, dstufft, vinay.sajip
Date 2015-02-06.00:03:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423180981.46.0.156182357728.issue23399@psf.upfronthosting.co.za>
In-reply-to
Content
There is a subtle behavior difference between virtualenv and pyvenv.  When you create a venv with virtualenv, the symbolic links files <venv>/bin are relative, while they are absolute with pyvenv.  This means that virtual environments created with virtualenv can be relocated (modulo the #! lines of the script, but let's not worry about that for now), but virtual environments created with pyvenv cannot be relocated.

With pyvenv, you also have <venv>/lib64 pointing to an absolute path.

AFAICT, there's no good reason why the symlink targets must be absolute paths.  Relative paths work just fine for virtualenv and they should work fine for pyvenv.

This patch changes the lib64 and <venv>/bin/* symlinks to be relative.  There should be no change when symlinks are disabled or are unavailable.

One remaining question is whether <venv>/bin/python itself should be relative.  In virtualenv, even with something like `-p /usr/bin/python3.4` you still get a relative link.  <venv>/bin/python points outside of the venv, so the question is whether the $PATH-dependent behavior of virtualenv is worthwhile or not.  My patch does not change this symlink.
History
Date User Action Args
2015-02-06 00:03:01barrysetrecipients: + barry, vinay.sajip, dstufft
2015-02-06 00:03:01barrysetmessageid: <1423180981.46.0.156182357728.issue23399@psf.upfronthosting.co.za>
2015-02-06 00:03:01barrylinkissue23399 messages
2015-02-06 00:03:01barrycreate