Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy libs/pythonXY.lib to support building of C extensions without di…
…stutils This issue was discovered while using virtualenv to create an isolated environment and test that a source distribution would compile without using the knowledge hardcoded in distutils.sysconfig and virtualenv/virtualenv_embedded/distutils-init.py In other word, without relying on the fact virtualenv monkey patch distutils to ensure the value associated with LIBDIR variable is correct. This is relevant because the library location is implicitly specified in PC/pyconfig.h 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- [...] /* For an MSVC DLL, we can nominate the .lib files used by extensions */ #ifdef MS_COREDLL # ifndef Py_BUILD_CORE /* not building the core - must be an ext */ # if defined(_MSC_VER) /* So MSVC users need not specify the .lib file in their Makefile (other compilers are generally taken care of by distutils.) */ # if defined(_DEBUG) # pragma comment(lib,"python35_d.lib") # elif defined(Py_LIMITED_API) # pragma comment(lib,"python3.lib") # else # pragma comment(lib,"python35.lib") # endif /* _DEBUG */ # endif /* _MSC_VER */ # endif /* Py_BUILD_CORE */ #endif /* MS_COREDLL */ [...] 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- References: * https://docs.python.org/2/extending/windows.html#using-dlls-in-practice * https://docs.python.org/3.6/extending/windows.html#using-dlls-in-practice Tested-by: Samuele Maci <macisamuele@gmail.com>
- Loading branch information