Bug 1100925 - Virtualenv no longer attempts to use symlinks when the os module does not have it. r=gps

Before, virtualenv would try to use symlinks based entirely on the value given by the options parser.

Unfortunately, some versions of Python cannot symlink (specifically the MinGW version of Python).

Now, virtualenv ensures the os module has the symlink funciton before attempting to use the symlink function.

MozReview-Commit-ID: DFJ59AaPNpB
This commit is contained in:
Nathan Hakkakzadeh
2016-06-02 14:29:26 -07:00
parent 777e4e9a20
commit 8382a205c0

View File

@@ -708,7 +708,7 @@ def main():
no_setuptools=options.no_setuptools,
no_pip=options.no_pip,
no_wheel=options.no_wheel,
symlink=options.symlink)
symlink=options.symlink and hasattr(os, 'symlink')) # MOZ: Make sure we don't use symlink when we don't have it
if 'after_install' in globals():
after_install(options, home_dir)