Commits

Anonymous committed b25db4b

[svn r3344] look for files like zlib.so in system site-packages. In the case of MacPorts Python, zlib.so is installed in site-packages but is required by setuptools

  • Participants
  • Parent commits 2f5af52

Comments (0)

Files changed (2)

File docs/index.txt

 * Fix a problem with missing ``DLLs/zlib.pyd`` on Windows.  Create
 * ``bin/python`` (or ``bin/python.exe``) even when you run virtualenv
   with an interpreter named, e.g., ``python2.4``
+* Fix MacPorts Python
 
 1.0
 ~~~

File virtualenv.py

     stdlib_dirs = [os.path.dirname(os.__file__)]
     if sys.platform == 'win32':
         stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs'))
+    elif sys.platform == 'darwin':
+        stdlib_dirs.append(join(stdlib_dirs[0], 'site-packages'))
     for stdlib_dir in stdlib_dirs:
+        if not os.path.isdir(stdlib_dir):
+            continue
         for fn in os.listdir(stdlib_dir):
             if fn != 'site-packages' and os.path.splitext(fn)[0] in REQUIRED_MODULES:
                 copyfile(join(stdlib_dir, fn), join(lib_dir, fn))