You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set the --copies parameter in ~/.config/virtualenv/virtualenv.ini I cannot override it later with --symlinks on the commandline.
Steps to Reproduce
Create virtualenv.ini file containing
[virtualenv]copies = True
then run
$ virtualenv default
$ ls -lah default/bin/python*-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 default/bin/python-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 default/bin/python3-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 default/bin/python3.8
$ virtualenv --copies copies
$ ls -lah copies/bin/python*-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 copies/bin/python-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 copies/bin/python3-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 copies/bin/python3.8
$ virtualenv --symlinks symlinks
$ ls -lah symlinks/bin/python*-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 symlinks/bin/python-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 symlinks/bin/python3-rwxr-xr-x 1 nils nils 14K 22. Apr 09:35 symlinks/bin/python3.8
As you can see, there are no symlinks in any of the three virtualenvs. I would expect the last virtualenv to have symlinks instead of copies.
Remove virtualenv.ini and retry
$ virtualenv default
$ ls -lah default/bin/python*lrwxrwxrwx 1 nils nils 15 22. Apr 09:39 default/bin/python -> /usr/bin/pythonlrwxrwxrwx 1 nils nils 6 22. Apr 09:39 default/bin/python3 -> pythonlrwxrwxrwx 1 nils nils 6 22. Apr 09:39 default/bin/python3.8 -> python
$ virtualenv --copies copies
$ ls -lah copies/bin/python*-rwxr-xr-x 1 nils nils 14K 22. Apr 09:39 copies/bin/python-rwxr-xr-x 1 nils nils 14K 22. Apr 09:39 copies/bin/python3-rwxr-xr-x 1 nils nils 14K 22. Apr 09:39 copies/bin/python3.8
$ virtualenv --symlinks symlinks
$ ls -lah symlinks/bin/python*lrwxrwxrwx 1 nils nils 15 22. Apr 09:39 symlinks/bin/python -> /usr/bin/pythonlrwxrwxrwx 1 nils nils 6 22. Apr 09:39 symlinks/bin/python3 -> pythonlrwxrwxrwx 1 nils nils 6 22. Apr 09:39 symlinks/bin/python3.8 -> python
and the expected behaviour shows.
Environment
Provide at least:
OS: Arch Linux Latest
pip list of the host python where virtualenv is installed:
So the problem here is that in this case both copies and symlinks are set to True, and in such case we favour copy. The options object sadly doesn't know the source of the setting (ini file, env-var or cli flag) so we can't easily tell which to favour, so we picked the option that's more robust... in this case that's favouring copy. Not sure how to fix this.
Issue
If I set the
--copies
parameter in~/.config/virtualenv/virtualenv.ini
I cannot override it later with--symlinks
on the commandline.Steps to Reproduce
Create
virtualenv.ini
file containingthen run
As you can see, there are no symlinks in any of the three virtualenvs. I would expect the last virtualenv to have symlinks instead of copies.
Remove
virtualenv.ini
and retryand the expected behaviour shows.
Environment
Provide at least:
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
:The text was updated successfully, but these errors were encountered: