-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add PEP 518 build-requires support #33
Comments
I have a WIP for adding support to pip for using FWIW, I also have a WIP for using pip instead of easy_install for Note: preferring setuptools' pkg_resources over pip's vendored version here would slightly lower the costs of using rwt when all requirements are already available. |
|
That would solve this issue without any changes to pip-run (formerly rwt). |
…roject.toml and include those dependencies in the run. Fixes #33.
* Use `extend-ignore` in flake8 config This option allows to add extra ignored rules to the default list instead of replacing it. The default exclusions are: E121, E123, E126, E226, E24, E704, W503 and W504. Fixes #28. Refs: * https://github.com/pypa/setuptools/pull/2486/files#r541943356 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore * Enable complexity limit. Fixes jaraco/skeleton#34. * Replace pep517.build with build (#37) * Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs <[email protected]> * Use license_files instead of license_file in meta (#35) Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file Co-authored-by: Jason R. Coombs <[email protected]>
I'm not sure this feature is needed here. I'm going to close this unless someone else wants to revive it. |
Although the PEP 518 support added by pip 10 goes a long way toward supporting the use cases of installing dependencies for the "install" and "wheel [build]" steps, it is of much less help for many of the other use-cases that setuptools
setup_requires
facilitates. A few prominent ones:But more generally, anything that invokes
setup.py
for its distutils-based behaviors.@pganssle has proposed that Setuptools should present a CLI that also supports PEP 518 for this use-case, and I'm convinced something like that is needed, as I also as hard as I try am finding it difficult to convert projects away from the tried-and-true paradigms to whole new ones without real issues arising.
But it also occurs to me that there is a project that has support for installing packages on demand and which might be a suitable bridge for
setup.py
, and that's this project (RWT).RWT already builds on pip and builds throw away environments for the duration of a command (not dissimilar to what setup-requires does). And RWT was written with supplanting many setup-requires use-cases.
What RWT doesn't have is support for PEP 518 build requirements, but since it's a thin wrapper around pip, if pip were to supply an argument to
pip install
, namely--build-reqs
, RWT could build on that also, and it would remove the need for multiple packages to have build-requirement installer support.Here's how it would work. If invoked on a directory containing a pyproject.toml (or referencing such a file), pip would install the build requirements:
But in the case where a user does not wish to install the build requirements into the environment, but does wish to invoke a setup.py command with the build requirements present, they could use rwt as the tool to do so:
I was originally thinking that
pip
should expose a new commandinstall-build-reqs
, but then I realized thatrwt
only wrapspip install
, so a parameter topip install
makes a lot more sense.Alternatively,
rwt
could implement this support more directly (without any modifications to pip) by adding a parameter that (a) bypasses default behavior of passing parameters to pip and (b) reads the pyproject.toml and passes the parsed deps topip install
instead.Advantages of this proposed approach:
pip run
as proposed in Feature: incorporate pip-run as pip run pypa/pip#3971)Disadvantages:
rwt
) to gain the functionality (barring Feature: incorporate pip-run as pip run pypa/pip#3971).rwt
design doesn't keep the build environment around the way setup-requires does, so the startup cost is paid at each invocation (a cost which is substantially mitigated in some cases by pip caches).@pganssle - if you haven't already, would you give rwt a trial run (I suggest having it installed in your global environment; it's lightweight and often immensely useful) and after let me know what you think about the proposal.
@benoit-pierre I'd be interested in your opinion also.
The text was updated successfully, but these errors were encountered: