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.

classification
Title: pyvenv --symlinks option is a no-op?
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: loewis, piotr.dobrogost, pitrou, python-dev, vinay.sajip
Priority: normal Keywords:

Created on 2012-07-07 15:37 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (10)
msg164879 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-07 15:38
It seems that, regardless of whether I specify --symlinks or not, pyvenv always creates symlinks:

$ pyvenv-3.3 env 
$ tree env/
env/
|-- bin
|   |-- activate
|   |-- pydoc
|   |-- pysetup3
|   |-- python -> python3.3
|   |-- python3 -> python3.3
|   `-- python3.3 -> /home/antoine/opt/bin/python3.3
|-- include
|-- lib
|   `-- python3.3
|       `-- site-packages
`-- pyvenv.cfg

5 directories, 7 files
msg164895 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-07-07 16:06
Try --no-symlinks.
msg164899 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-07 16:09
$ pyvenv-3.3 --no-symlinks env
usage: venv [-h] [--system-site-packages] [--symlinks] [--clear] [--upgrade]
            ENV_DIR [ENV_DIR ...]
venv: error: unrecognized arguments: --no-symlinks


:-)
msg164927 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2012-07-07 19:52
Following discussions on python-dev, the default is always to symlink, except on Windows (no support for true symlinks on XP and older) and Mac OS X (problems with framework builds). The --symlinks indicates, on those platforms where symlinks is not the default, to use symlinks anyway. This will most likely only be useful on Windows Vista, Windows 7 and Mac OS X with a non-framework build of Python.
msg164928 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-07 20:00
> Following discussions on python-dev, the default is always to symlink,
> except on Windows (no support for true symlinks on XP and older) and
> Mac OS X (problems with framework builds). The --symlinks indicates,
> on those platforms where symlinks is not the default, to use symlinks
> anyway. This will most likely only be useful on Windows Vista, Windows
> 7 and Mac OS X with a non-framework build of Python.

Ok, then it might be nice to make the usage string (which is printed
with pyvenv --help) clearer.
msg164930 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2012-07-07 20:07
> Ok, then it might be nice to make the usage string (which is printed
with pyvenv --help) clearer.

Fair point, I'll update the help text to be clearer.
msg165024 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-08 16:51
New changeset 9c345b4bd97e by Vinay Sajip in branch 'default':
Closes #15281, #15283: Don't make venv scripts executable, but copy source mode instead, and provide better help for pyvenv.
http://hg.python.org/cpython/rev/9c345b4bd97e
msg186961 - (view) Author: Piotr Dobrogost (piotr.dobrogost) Date: 2013-04-14 22:20
> Following discussions on python-dev, the default is always to symlink,
> except on Windows (no support for true symlinks on XP and older) and

In this case couldn't symlinks be automatically used on Windows Vista or newer?
msg186969 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-04-15 08:45
> In this case couldn't symlinks be automatically used on Windows Vista or newer?

It seems simpler if the default behaviour is the same on all Windows flavours - you can specify --symlinks if you're on Windows Vista or later.
msg187034 - (view) Author: Piotr Dobrogost (piotr.dobrogost) Date: 2013-04-15 21:57
It's simpler but is it better this way? I doubt. I think we should take advantage of symlinks whenever we can and only fallback to copying if they are not available.
History
Date User Action Args
2022-04-11 14:57:32adminsetgithub: 59486
2013-04-15 21:57:13piotr.dobrogostsetmessages: + msg187034
2013-04-15 08:45:05vinay.sajipsetmessages: + msg186969
2013-04-14 22:20:59piotr.dobrogostsetnosy: + piotr.dobrogost
messages: + msg186961
2012-07-08 16:51:05python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg165024

resolution: fixed
stage: resolved
2012-07-07 20:07:15vinay.sajipsetmessages: + msg164930
2012-07-07 20:00:15pitrousetmessages: + msg164928
2012-07-07 19:52:58vinay.sajipsetmessages: + msg164927
2012-07-07 16:09:11pitrousetmessages: + msg164899
2012-07-07 16:06:27loewissetnosy: + loewis
messages: + msg164895
2012-07-07 15:38:29pitrousetversions: + Python 3.3
nosy: + vinay.sajip

messages: + msg164879

components: + Library (Lib)
type: behavior
2012-07-07 15:37:22pitroucreate