-
-
Notifications
You must be signed in to change notification settings - Fork 42
Use PEP 518 in packages to require astropy-helpers at build time #334
Comments
would |
I think it would just try and get the latest version from PyPI and ignore the sub-module. We may want to re-assess whether we really want to have the sub-module in the long term though. The whole current system was in part done because of things like |
It would be though still nice to somehow have a control over the versions installed, especially if it's an interim dev version. |
I am going to hijack this a little and talk about what I think the way forward for I think helpers should be divided up into two bits, the first should contain the components needed to build the sdist this would include:
basically this should be everything needed to help out with a pure python package, and everything needed to build the sdist of the a package with C/Cython extensions. This code would then be placed in a single file and copied into tree like The second component would be an installable python package distributed via PyPI, which would be installed (pinned to a specific version at build time) by pip when installing (building) the sdist. This would contain all the compile time helpers and discovery stuff needed to build extensions. The main reason for this is that the build time dependencies as described by PEP 518 are only installed at build time, i.e. not when generating an sdist, and given that there is a bunch of things that run at sdist time, i.e. package data, C files and version hashes, we need that stuff separated out into a different (in tree) component if we are going to utilize PEP 518 |
@astrofrog points out that the |
Re: version helpers -- #420 |
I'm having deja vu that we went through all of these arguments from above during the coordination meeting last month, and the conclusion was then that we don't make it an installable package (and that probably won't move away from submoduling just right now). |
PEP 518 allows you to explicitly pin a version of the build dependencies, which are installed into the build environment, nobody should have Also, I put my thoughts down here based on digging I have done since the coordination meeting, and so that there is a record of these things in a sensible place. |
Also, I have just tested what happens if you have astropy-helpers installed in your env and then you use PEP 518 to specify a version of astropy-helpers:
then I have: [build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel", "astropy-helpers==3.0.1"] in pyproject.toml and when I |
I was just about to make an issue for the same thing. pip now supports pyproject.toml so it should be possible to use that and eventually get rid of ah_bootstrap.py as well. |
What came out of these experiments and discussions became: astropy/astropy-APEs#52 |
Didn't |
This is closed by APE 17 and the existence of the extension-helpers repo |
PEP 518 specifies that Python packages can include a
pyproject.toml
file that specifies build-time dependencies. This is intended to replacesetup_requires
, which was never useful for us (and many others) sincesetup_requires
was only taken into account whensetup()
was run, whereas e.g.astropy-helpers
is needed to even runsetup.py
at all. With PEP 518 now supported by pip, we could add apyproject.toml
file in astropy and affiliated packages with:optionally with a fixed version for astropy-helpers. This would then allow us, I think, to get rid of a lot of
ah_bootstrap.py
or simplify it significantly.The text was updated successfully, but these errors were encountered: