Helpers to setup the environment to compile extensions for Python
Project description
# py_compile_win_helpers
Helpers to setup the environment to compile extensions for Python.
It’s meant to be used in Python code to automate getting a library and building it as an extension module without relying on the current env.
It should take care of env variables such as MSSdk, DISTUTILS_USE_SDK, finding the compiler and executing vcvarsall or SetEnv as needed.
Example:
- def main():
subprocess.check_call([‘git’, ‘clone’, ‘some_repo’]) import py_compile_win_helpers env = py_compile_win_helpers.get_compile_env() subprocess.check_call([‘python’, ‘setup.py’, ‘build’], env=env, cwd=os.path.join(‘some_repo’))
# Requisites
For Python 2.6 and 2.7, Microsoft Visual C++ Compiler for Python 2.7 is needed. – https://www.microsoft.com/en-us/download/details.aspx?id=44266
For Python 3.3 and 3.4, Visual Studio 2010 Express is needed.
For Python 3.5 and 3.6, Visual Studio 2015 is needed.
– Note, older versions can be found at https://www.visualstudio.com/vs/older-downloads/ but you need to register with Microsoft (free) to be able to find downloads for older versions of Visual Studio
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file py_compile_win_helpers-1.0.0.tar.gz
.
File metadata
- Download URL: py_compile_win_helpers-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a611e9f8c420393dc0ebd37a142f97e89fdaea16b1b21fd5dbc0feac99a20717 |
|
MD5 | 4ecbf65c8a6a13736068f3b272f46210 |
|
BLAKE2b-256 | 4561869bcd37dc38cd1f91969ae153b3f6675fdfe101ae92c3ad8c2d6328d9d3 |