-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix pip install --pre
for packages with dependencies defined in pyproject.toml
and setup.py
#10692
Conversation
pyproject_path.write_text( | ||
"[build-system]\n" | ||
f'requires = ["setuptools", "wheel", "{depends_package}"]\n' | ||
'build-backend = "setuptools.build_meta"\n' | ||
) | ||
setup_py_path = local_dir.joinpath("setup.py") | ||
setup_py_path.write_text( | ||
"from setuptools import setup\n" | ||
f"setup(name='dummy', setup_requires=['{depends_package}'])\n" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, these should likely be two separate test cases, one for each config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue arises when build dependencies are both declared in setup.py
and pyproject.toml
, else it is fine.
Maybe that's a case that's not supported, but it worked until v21.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh huh interesting. I guess there’s some conflict with pip and setuptools’s build dependency population logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good! Well done @t20100!
Would you like to rebase this PR, so we can merge easier?
Co-authored-by: Thomas VINCENT <thomas.vincent@esrf.fr>
f8907f6
to
23b09c1
Compare
Sure, I just rebased to |
Any update on this effort? I would very much like this feature! |
Leaving this open in case someone else wants to raise some issues, but otherwise this goes to 22.2. |
This PR makes
pip install --pre
works when a build dependency defined both insetup.py
andpyproject.toml
is available as a pre-release by allowing pre-releases duringcheck_requirements
.closes #10222