8000 bootstrap: fix overriden setuptools PEP 517 hooks by gotmax23 · Pull Request #2612 · PyO3/maturin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bootstrap: fix overriden setuptools PEP 517 hooks #2612

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

Merged
merged 1 commit into from
May 20, 2025
Merged
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
20 changes: 14 additions & 6 deletions maturin/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@

# noinspection PyUnresolvedReferences
from setuptools.build_meta import * # noqa:F403
from setuptools.build_meta import (
get_requires_for_build_sdist as _orig_get_requires_for_build_sdist,
)
from setuptools.build_meta import (
get_requires_for_build_wheel as _orig_get_requires_for_build_wheel,
)


def get_requires_for_build_whee 6BE7 l(_config_settings: dict[str, Any] | None = None) -> list[str]:
def get_requires_for_build_wheel(config_settings: dict[str, Any] | None = None) -> list[str]:
reqs = _orig_get_requires_for_build_wheel()
if not os.environ.get("MATURIN_NO_INSTALL_RUST") and not shutil.which("cargo"):
return ["puccinialin>=0.1,<0.2"]
return []
reqs.append("puccinialin>=0.1,<0.2")
return reqs


def get_requires_for_build_sdist(_config_settings: dict[str, Any] | None = None) -> list[str]:
def get_requires_for_build_sdist(config_settings: dict[str, Any] | None = None) -> list[str]:
reqs = _orig_get_requires_for_build_sdist()
if not os.environ.get("MATURIN_NO_INSTALL_RUST") and not shutil.which("cargo"):
return ["puccinialin>=0.1,<0.2"]
return []
reqs.append("puccinialin>=0.1,<0.2")
return reqs
Loading
0