[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

Vinay Sajip report at bugs.python.org
Thu Oct 4 18:29:40 CEST 2012


Vinay Sajip added the comment:

Since I expect it may be some time before the next Python release is out, ISTM a temporary workaround would be to add a line following line 192 of Lib\distutils\command\build_ext.py, which reads

            self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))

The new line should read

            self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs'))

Which will result in adding both directories to the library search path. This is a little untidy in the case when you're not in a venv, but it should still work. With that change, the link command now looks like

C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python33\libs /LIBPATH:C:\Python33 /LIBPATH:C:\temp\venv\PCbuild /EXPORT:PyInit__regex build\temp.win32-3.3\Release\Python3\_regex.obj build\temp.win32-3.3\Release\Python3\_regex_unicode.obj 
 /OUT:build\lib.win32-3.3\_regex.pyd /IMPLIB:build\temp.win32-3.3\Release\Python3\_regex.lib /MANIFESTFILE:build\temp.win32-3.3\Release\Python3\_regex.pyd.manifest

and the command succeeds.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16116>
_______________________________________


More information about the Python-bugs-list mailing list