Skip to content

Commit

Permalink
Merge pull request astropy#10825 from astrofrog/add-pyproject
Browse files Browse the repository at this point in the history
Fix Azure sdist job
  • Loading branch information
astrofrog authored Oct 10, 2020
2 parents b63dc88 + e699819 commit 6d64332
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ include CITATION
include astropy/CITATION

include ah_bootstrap.py
include setup.py
include setup.cfg
include pyproject.toml
include astropy/tests/coveragerc
recursive-include astropy *.pyx *.c *.h *.map *.templ

Expand Down
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# NOTE: the v4.0.x branch of astropy still uses astropy-helpers
# but we include pyproject.toml here so that python -m build can
# work out of the box. In setup.py, we manually ensure that
# astropy_helpers can be imported as an additional build time
# dependency.

[build-system]
requires = ["setuptools",
"wheel",
"cython==0.29.14",
"jinja2==2.10.3",
# NOTE: we can't use the oldest-supported-numpy package
# here because it conflicts with the setup_requires
# setting in setup.cfg which is present in the v4.0.x
# branch.
"numpy==1.16.*; python_version<='3.7'",
"numpy==1.17.*; python_version>='3.8'"]
build-backend = 'setuptools.build_meta'
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
import os
import builtins

# Because we have a pyproject.toml file, the isolated build environment
# doesn't allow the ah_bootstrap file to be imported unless the current
# directory is added to the Python path
import sys
sys.path.append(os.path.abspath("."))
import ah_bootstrap # noqa

from astropy_helpers.distutils_helpers import is_distutils_display_option
Expand Down

0 comments on commit 6d64332

Please sign in to comment.