Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in pep517 build default compatibility to off instead of always specifying #1992

Merged
merged 5 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [Unreleased]

* Fix usage of `--compatibility` when run as a PEP517 backend in [#1992](https://github.com/PyO3/maturin/pull/1992)

## [1.5.0] - 2024-03-05

* Bump metadata version from 2.1 to 2.3 in [#1965](https://github.com/PyO3/maturin/pull/1965). Source distributions created by maturin now have reliable metadata, meaning tool such as pip, uv and poetry could skip building them for version resolution.
Expand Down
16 changes: 10 additions & 6 deletions maturin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,26 @@ def _build_wheel(
) -> str:
# PEP 517 specifies that only `sys.executable` points to the correct
# python interpreter
command = [
base_command = [
"maturin",
"pep517",
"build-wheel",
"-i",
sys.executable,
"--compatibility",
"off",
]
command.extend(_additional_pep517_args())
options = _additional_pep517_args()
if editable:
command.append("--editable")
options.append("--editable")

pep517_args = get_maturin_pep517_args(config_settings)
if pep517_args:
command.extend(pep517_args)
options.extend(pep517_args)

if "--compatibility" not in options and "--manylinux" not in options:
# default to off if not otherwise specified
options = ["--compatibility", "off", *options]

command = [*base_command, *options]

print("Running `{}`".format(" ".join(command)))
sys.stdout.flush()
Expand Down
Loading