Changelog.md
--strip conflicting with --include-debuginfo in develop (#3057)[tool.maturin.generate-ci.github] config support (#3066)data symlink permission handling (#3069)build_context into focused submodules (#3076).def file for zig + windows-gnu to export PyInit symbol (#3079)-undefined dynamic_lookup via CARGO_ENCODED_RUSTFLAGS on macOS (#3083)metadata_directory in build_wheel per PEP 517 (#3086)--generate_stubs build options (#3105)WheelRepairer trait (#3112)maturin build --sdist wheel name/layout for excluded workspace crates (#3031)maturin develop on Windows ARM with x86 Python (#3011)external_packages bindings from uniffi wheels (#3013)--sdist flag (#3014)include-import-lib option to bundle Windows import libraries in wheels (#3017)--sbom-include (#3004)--sbom-include CLI argument for additional SBOM files (#2999)OUT_DIR assets in wheel builds (#3001)mymindstorm/setup-emsdk@v14 in generated GitHub Actions workflow (#2941)RECORD paths (on Windows) (#2965)--compatibility pypi with other --compatibility values (#2928)Note: This release was yanked to a regression: https://github.com/PyO3/maturin/issues/2909
ModuleWriter to be easier to implement and usetool.maturin.editable-profile option to override profile for editable package installations.abi3 wheels on non-Windows platforms that aren't cross-compiling, the sysconfigdata of the interpreter used to run maturin will now be used, rather than a dummy interpreter.extension-module feature on PyO3 0.26+.add_directory() from ModuleWriter and make it an implementation detail for the specific impl.build-details.jsonuse-base-python option to pyproject.toml with the same behaviour as MATURIN_PEP517_USE_BASE_PYTHON.project.license-files to source distributions.License-Expression over License.Cargo.toml in #2667project.license and project.license-files in #2647.--compatibility pypi to only build wheels with platform tags that can also be uploaded to PyPI. This blocks e.g. building for riscv64, which is supported by manylinux, but not by PyPI.build and develop modes, in #2625._PYTHON_HOST_PLATFORM in #2594MATURIN_NO_INSTALL_RUST to disable this behavior. #2421maturin develop with latest uv in #2584PYO3_PYTHON env var support in #2534maturin develop --skip-install in #2504pyproject.toml error to warning in #2417maturin develop fail if version info is invalid in pyproject.toml in #2418pyo3 0.23+ in #2413xwin to compile on Windows when MSVC compiler can build for the target in #2353project.license.files handling in #2332--all-features when building source distribution in #2215. in #2219cargo package --list warnings in #2186_PYTHON_HOST_PLATFORM in #2122MATURIN_PEP517_USE_BASE_PYTHON is set in #2134generate-ci in #2011develop command in #2015-v option in #2080--compatibility when run as a PEP517 backend in #1992VIRTUAL_ENV and CONDA_PREFIX env vars in #1879-i python when cross compiling in #1891xwin using env vars in #1961MATURIN_PEP517_ARGS env var in #1820uniffi-bindgen if no root package is configured in #1797workspace.members in sdist in #1811MACOSX_DEPLOYMENT_TARGET for editable builds by default in #1815--pip-path argument to develop command in #1753python.exe by default in build command on Windows in #1757uniffi-bindgen to be installed for uniffi bindings in #1762[build-system] requires in #1793upload command in #1722link-native-libraries check for emscripten target in #1724ALL_PROXY to upload command in #1727x86_64h-apple-darwin target support in #1717EXT_SUFFIX in #1648--skip-install option to maturin develop in #1654--config-settings in PEP517 backend in #1624--universal2 cli option in #1620,
use --target universal2-apple-darwin instead.config_settings support in #1619,
deprecate MATURIN_PEP517_ARGS in favor of the new build-args config setting.project.name over Cargo.toml package.name in #1608dev-dependencies in sdist in #1610--no-default-features by default when bootstrapping from sdist in #1333sdist-include option in pyproject.toml in #1335python-source option in Cargo.toml in #1335patchelf version warning into a hard error in #1335uniffi_bindgen CLI is required for building uniffi bindings wheels in #1352rustflags settings in cargo configuration file in #1405pyproject.toml in #1536Cargo.toml by viccie30 in #1572git source distribution generator in #1587EXT_SUFFIX when cross compiling musllinux wheels for Python 3.11 in #1560package.metadata.maturin.name in favor of tool.maturin.module-name in pyproject.toml in #1531generate-ci commandgenerate-ci command in #1484ext_suffix for Emscripten target if not provided in PYO3_CONFIG_FILE in #1491package.metadata.maturin.data in favor of tool.maturin.data in pyproject.toml in #1492maturin develop now looks for a virtualenv .venv in the current or any parent directory if no virtual environment is active.generate-ci command to generate CI configuration in #1456--universal2 in favor of universal2-apple-darwin target in #1457Cargo.toml contains removed python package metadata in #1471extension_name instead of module_name for CFFI extensions in develop mode in #1476dev-dependencies in sdist when there are no path dependencies in #1441[package.metadata.maturin] in #1409MACOSX_DEPLOYMENT_TARGET when query default value from rustc in #1395pyproject.toml in #1347SOURCE_DATE_EPOCH when building wheels in #1334python-source option in Cargo.toml in favor of the one in pyproject.toml in #1291cargo_metadata to 0.15.0 to fix maturin build on old Rust versions like 1.48.0 in #1279Cargo.toml in #1200.
Python package metadata should be specified in the project section of pyproject.toml instead as PEP 621 specifies.--target wasm32-wasi.src project layout in #1185--src option to generate src layout for mixed Python/Rust projects in #1189license-file field of Cargo.toml in #1195workspace.members in Cargo.toml from sdist if there isn't any path dependency in #1227libpython check on Python 3.7 and older versions in #1229sys.implementation.name != platform.python_implementation() in #1232.
Fixes the compatibility tags for Pyston.MACOSX_DEPLOYMENT_TARGET isn't specified in #1251[tool.maturin.include] and [tool.maturin.exclude] and deprecate [tool.maturin.sdist-include] #1255uniffi bindings in #1275LC_ID_DYLIB for abi3 wheels in #1208--locked to Cargo when bootstrap from sdist in #1212maturin develop in Windows conda virtual environment in #1146pyo3 and build.rs without cdylib crate type in #1150indicatif in #1163Cargo.lock by default in source distribution in #1170Cargo.toml in new project template in #1109maturin develop on Windows when using Python installed from msys2 in #1112Cargo.toml of local dependencies in sdist in #1114goblin instead of shelling out to patchelf to get rpath in #1139--crate-type cdylib on Rust 1.64.0 in #1060zig ar support in #1073maturin sdist command in #1097pyproject.toml isn't in the same dir of Cargo.toml in #1099pyproject.toml to be relative to pyproject.toml in #1100.
It's technically a breaking change, but previously it doesn't work properly.sdist-include paths to be relative to pyproject.toml in #1103Cargo.toml and pyproject.toml path handling in #1043pyproject.toml if pyproject.toml exists in #1044.
It's technically a breaking change, but previously it doesn't work properly
if the directory containing pyproject.toml isn't recognized as project root.python-source option to [tool.maturin] section of pyproject.toml in #1046Cargo.toml in #1048.
Please migrate to PEP 621 instead.python-source to be relative to the file specifies it in #1049data to be relative to the file specifies it in #1051maturin develop in #1052pyproject.toml in parent directories of Cargo.toml in #1054python3 -m maturin in #1008features in pyproject.toml in #1014maturin develop in #1016cargo rustc --crate-type cdylib on Rust nightly/dev channel in #1020maturin build command in #955, --no-sdist option is replaced by --sdistPATH in #964--cargo-extra-args and --rustc-extra-args options in #972. You can now pass all common cargo build arguments directly to maturin build--repository-url option in upload command no longer accepts plain repository name, full url required and -r short option moved to --repository in #987--target option to maturin list-python command in #957--find-interpreter option to build and publish commands to search for python interpreters in #964ARCHFLAGS for macOS to be compatible with cibuildwheel in #967maturin build command in #972wasm32-unknown-emscripten target in #974maturin develop for arm64 Python on M1 Mac when default toolchain is x86_64 in #980--repository option to maturin upload command in #987maturin b for maturin build and maturin dev for maturin develop subcommands in #994pip error messages to be utf-8 encoding in #953requires-python and bindings crate in #954PYO3_PYTHON env var for PyPy when abi3 is enabled in #960py -X.Y when pythonX.Y cannot be found on Windows in #943-i x.y and -i python-x.y in maturin build command in #925MATURIN_REPOSITORY_URL in #913MATURIN_USERNAME in #915generate-import-lib feature of pyo3 in #918cargo-xwin for cross compiling to Windows MSVC targets in #919__all__ for pure Rust projects in #886RUSTFLAGS environment variable to an empty string in #887PYO3_CONFIG_FILE in #899PYO3_NO_PYTHON environment variable for pyo3 0.16.4 and later in #875pyo3 0.16.4 and later versions with generate-abi3-import-lib feature enabled no longer require a Python interpreter in #879.dist-info/license_files following PEP 639 in #862--interpreter option in #873python3.6 from ghcr.io/pyo3/maturin docker image..dist-info/license_files following PEP 639 in #837PYO3_NO_PYTHON hack for Windows in #848-r option as a short alias for --release in #854pyo3-ffi by ijl in #804musllinux_1_2 for musl target if it's not bin bindings in #808maturin build -i in #813, use maturin sdist instead.--zig in #817toml to tomllib / tomli by Contextualist in #821header.h in workspace target directory in #833pyproject.toml when cargo manifest is not specified in #806--version flag from clap 3.0 upgradezig cc as linker for easier cross compiling and manylinux compliance in #756MATURIN_PEP517_ARGS env var in #786No such file or directory error when LD_LIBRARY_PATH contains non-existent paths in #794manylinux_2_28 and manylinux_2_31 in #755maturin develop command to avoid triggering SIGSEV in running process in #760new and init commands in maturin --help in #734Cargo.lock to sdist when --locked or --frozen specified in #749maturin init command as a companion to maturin new in #719password-storage feature in #725maturin develop command in #732sysconfig.platform on non-portable Linux in #709cffi package dependency in #711MACOSX_DEPLOYMENT_TARGET env var in wheel platform tag in #716.gitignore in #695pip install maturin on OpenBSD 6.8 in #697maturin new command for bootstrapping new projects in #705sysconfig.get_platform parsing for macOS in #690develop command to act identical to PEP 660 editable wheels in #653Summary metadatalibz.so.1 to whitelisted libraries in #625maturin develop command in #633 and #634maturin develop command in #635manylinux/compatibility options is specified in pyproject.toml in #637[tool.maturin] options from pyproject.toml will be used automatically in #605pyproject.toml by domdfcoding in #588repository field as Source Code in project URL in #590maturin develop for PyPy on Unix in #596maturin completions <shell> command to generate shell completions in #586pyproject.toml in #555[package.metadata.maturin] table of Cargo.toml to this new [project] table of pyproject.toml--manylinux is now called --compatibility and supports musllinuxmy_project.my_project is now also importable (and equal to just my_project)Cargo.toml's authors field is now optional per Rust RFC 3052 in #573Cargo.toml by switch from toml_edit to toml crate in #577manylinux_2_27 support in #521PyInit_<module_name> warning with Rust submodule in #528pyproject.toml missing maturin version constraint in #545upload command is now implemented, it is mostly similar to twine upload. #484--target being silently ignored--skip-existing option to publish by messense #444manylinux_2_24 support in #451auditwheel Cargo feature.classifier to classifiers for pypi compatibility. The old classifier is still available and now also works with pypi-C target-feature=-crt-staticabi3 feature is selected but no minimum versionPYO3_CROSS_LIB_DIR for cross compiling with abi3 targeting windows.package.metadata.maturin.classifier is renamed to classifiers by kngwyu in #416--manylinux=[off|2010|2014] with manylinux2010 as default, and optionally --skip-auditwheel.project-url is now a toml dictionary instead of a toml list to conform to the standardcargo.exe if cargo was not found[tool.maturin] now supports sdist-include = ["path/**/*"] to
include arbitrary files in source distributions (#296).0.12's PYO3_PYTHON environment variable. #331build_sdist hook. This fixes tox support from maturin's sidematurin develop are now visible to pip and can be uninstalled with pip@ is not found in authors by evandrocoan in #290--features, --no-default-features and --all-features in --cargo-extra-args are passed to cargo metadata when determining the bindings, fixing problems in the previous release with arguments supported by cargo build but by cargo metadata.maturin build --interpreter/maturin publish --interpreter builds only a source distribution.With this release, the name of this project changes from pyo3-pack to maturin.
maturin sdist command as workaround for pypa/pip#6041build.rs anymore. The option to provide your own header file using a build.rs still exists.--manxlinux=[1|1-unchecked|2010|2010-unchecked|off] option allows to build for manylinux1 and manylinux2010, both with audithweel (1 or 2010) and without (1-unchecked or 2010-unchecked), but also for the native linux tag with off.--skip-auditwheel flag has been deprecated in favor of --manylinux=[1|1-unchecked|2010|2010-unchecked|off].Fixup release because the appveyor failed to release artifacts for windows for 0.4.1.
package.metadata.maturin.classifier. Implemented by ijl in #48. Example: [package.metadata.maturin]
classifier = ["Programming Language :: Python"]
--debug or --no-strip are given.With deflate and the strip options, the wheels get about 25x smaller:
| wheel | baseline | deflate | strip + deflate |
|---|---|---|---|
| get_fourtytwo-2.0.1-cp36-cp36m-manylinux1_x86_64.whl | 2,8M | 771K | 102K |
| hello_world-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 3,9M | 1,1M | 180K |
| points-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 2,8M | 752K | 85K |
--strip by ijl #7--bindings-crate to --bindings--target is now actually used for the wheel compatibility tag--target option which behaves like cargo option of the same namemusl feature combined with the musl target, you can build completely static binaries. The password-storage, which enables keyring integration, is now disabled by default. The Pypi packages are now statically linked with musl so that they are audtiwheel compliant.--debug with --release. All builds are now debug by defaultpip install maturin--no-default-features --features auditwheel creates a manylinux compliant binary for maturindevelop subcommand