RFE: --always-copy #344

Closed
nvMcJohn opened this Issue Oct 19, 2012 · 7 comments

Projects

None yet

7 participants

@nvMcJohn

Given that the footprint of the copy would be relatively small, would it be possible to add an option to always copy (as on windows) rather than symlinking?

The main benefit of copying is the ability to then check the virtual environment into source control.

Thanks!

Contributor
schmir commented Oct 19, 2012

that's also discussed in #92

Contributor
pnasrat commented Oct 23, 2012

I don't have a huge issue with this - do you want to try put a patch together.

Sure, I'll take a stab at it.

m0she commented Feb 19, 2013

I've made a simple patch that works for me (at least using a shared windows folder on a linux machine, which didn't work before) - https://gist.github.com/m0she/4990128 - just add --always-copy to your command-line to use.

I haven't tested it thoroughly nor is it completely abiding to the project coding conventions and github is stuck on cloning the repo - so I'm not sending a pull request (perhaps tomorrow)

pferreir commented Mar 7, 2013

+1 for this!
Thanks!

jpascal commented Sep 17, 2013

$ virtualenv --version
1.10.1
$ virtualenv --always-copy test
New python executable in test/bin/python
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in
load_entry_point('virtualenv==1.10.1', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg/virtualenv.py", line 821, in main
symlink=options.symlink)
File "/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg/virtualenv.py", line 956, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg/virtualenv.py", line 1377, in install_python
shutil.copyfile(py_executable_base, full_pth)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'python'

Contributor
qwcode commented Dec 5, 2013

this was added in #409
(the bug for it not working though is #495)

@qwcode qwcode closed this Dec 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment