pyproject.toml (PEP518), build isolation (PEP517) and optional build dependencies
Hi, I can't use pyproject.toml for some projects with "optional build dependencies" because of build isolation. However, it would be very useful because we have also real build dependencies. I created an issue in pip repository (https://github.com/pypa/pip/issues/6144) but it seems to be a more general problem. I didn't find anything about such potential problem in PEP 517/518. Any thoughts how it can be solved? In the issue, I propose this: ``` [build-system] # Minimum requirements for the build system to execute. requires = [ "setuptools", "wheel", "numpy", "cython", "jinja2", "fluidpythran>=0.1.7" ] # packages that are used during the build only if they are installed: optional = ["mpi4py", "pythran"] ``` Pierre Augier
How would you select/turn on optional packages? On Thu, Jan 17, 2019 at 12:22 PM PIERRE AUGIER < pierre.augier@univ-grenoble-alpes.fr> wrote:
Hi,
I can't use pyproject.toml for some projects with "optional build dependencies" because of build isolation.
However, it would be very useful because we have also real build dependencies.
I created an issue in pip repository ( https://github.com/pypa/pip/issues/6144) but it seems to be a more general problem.
I didn't find anything about such potential problem in PEP 517/518. Any thoughts how it can be solved?
In the issue, I propose this:
``` [build-system] # Minimum requirements for the build system to execute. requires = [ "setuptools", "wheel", "numpy", "cython", "jinja2", "fluidpythran>=0.1.7" ] # packages that are used during the build only if they are installed: optional = ["mpi4py", "pythran"]
```
Pierre Augier -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/NDCZF...
On Fri, 18 Jan 2019 at 03:20, PIERRE AUGIER <pierre.augier@univ-grenoble-alpes.fr> wrote:
Hi, I can't use pyproject.toml for some projects with "optional build dependencies" because of build isolation.
However, it would be very useful because we have also real build dependencies.
I created an issue in pip repository (https://github.com/pypa/pip/issues/6144) but it seems to be a more general problem.
I didn't find anything about such potential problem in PEP 517/518. Any thoughts how it can be solved?
At the PEP 517/518 level, this kind of thing is what the https://www.python.org/dev/peps/pep-0517/#get-requires-for-build-wheel dynamic installation hook is for: telling the build front end to install some extra dependencies into the isolated environment that aren't absolutely required, but some users may want. (This is also how build backends are expected to deal with platform-specific dependencies) At a `pip` level, the folks commenting on your proposal at https://github.com/pypa/pip/issues/6144 are also right that there may be room for a `--platform-dependent-build` option that allows a user to tell the build system to use the build isolation machinery (so it will automatically install required build dependencies), but allow those build environments to access the system site packages (so they can make full use of any platform-dependent packages that they find). That kind of option would be helpful in general for Linux-specific projects, conda-specific projects, etc. Setting "--platform-dependent-build" as the default would then be a task for end user's pip configuration files (and potentially application dependency management tools like pipenv). It definitely wouldn't be appropriate for packages to set it implicitly. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (3)
-
Bernat Gabor
-
Nick Coghlan
-
PIERRE AUGIER