Bug 1100925 - Virtualenv no longer attempts to use symlinks when the os module does not have it. r=gps
authorNathan Hakkakzadeh <nhakkakzadeh@mozilla.com>
Thu, 02 Jun 2016 14:29:26 -0700
changeset 305195 ca387c1ae6a3152e39561f37e605214df73fc18d
parent 305194 b88241fa95abfc16bfb1bdcddc92895c2de5ea46
child 305196 b2d61577bd01dd43f63cc18f161e1db2f68b6a34
push id79518
push usercbook@mozilla.com
push dateSun, 17 Jul 2016 08:09:59 +0000
treeherdermozilla-inbound@711963e8daa3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1100925
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
python/virtualenv/virtualenv.py
--- a/python/virtualenv/virtualenv.py
+++ b/python/virtualenv/virtualenv.py
@@ -703,17 +703,17 @@ def main():
                        clear=options.clear,
                        unzip_setuptools=options.unzip_setuptools,
                        prompt=options.prompt,
                        search_dirs=options.search_dirs,
                        download=options.download,
                        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)
 
 def call_subprocess(cmd, show_stdout=True,
                     filter_stdout=None, cwd=None,
                     raise_on_returncode=True, extra_env=None,
                     remove_from_env=None, stdin=None):
     cmd_parts = []