Environment Variables
Maturin reads a number of environment variables which you can use to configure the build process. Here is a list of all environment variables that are read by maturin:
Cargo environment variables
See environment variables Cargo reads
Python environment variables
VIRTUAL_ENV: Path to a Python virtual environmentCONDA_PREFIX: Path to a conda environmentMATURIN_PYTHON_SYSCONFIGDATA_DIR: Path to a directory containing asysconfigdata*.pyfile_PYTHON_SYSCONFIGDATA_NAME: Name of asysconfigdata*.pyfileMATURIN_PYPI_TOKEN: PyPI token for uploading wheelsMATURIN_PASSWORD: PyPI password for uploading wheels
pyo3 environment variables
PYO3_CROSS_PYTHON_VERSION: Python version to use for cross compilationPYO3_CROSS_LIB_DIR: This variable can be set to the directory containing the target's libpython DSO and the associated_sysconfigdata*.pyfile for Unix-like targets, or the Python DLL import libraries for the Windows target.This variable can be set to the directory containing the target's libpython DSO and the associated _sysconfigdata*.py file for Unix-like targets, or the Python DLL import libraries for the Windows target.PYO3_CONFIG_FILE: Path to a pyo3 config file
Networking environment variables
HTTP_PROXY/HTTPS_PROXY: Proxy to use for HTTP/HTTPS requestsREQUESTS_CA_BUNDLE/CURL_CA_BUNDLE: Path to a CA bundle to use for HTTPS requests
Other environment variables
MACOSX_DEPLOYMENT_TARGET: The minimum macOS version to targetSOURCE_DATE_EPOCH: The time to use for the timestamp in the wheel metadataMATURIN_EMSCRIPTEN_VERSION: The version of emscripten to use for emscripten buildsTARGET_SYSROOT: The sysroot to use for auditwheel wheel when cross compilingARCHFLAGS: Flags to control the architecture of the build on macOS, for example you can useARCHFLAGS="-arch x86_64 -arch arm64"to build universal2 wheels