diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index c68d12e4..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,16 +0,0 @@ -include CITATION.rst -include CHANGES.rst -include CODE_OF_CONDUCT.rst -include LICENSE.rst -include README.rst -include pyproject.toml - -recursive-include ccdproc *.pyx *.c *.pxd -recursive-include docs * -recursive-include licenses * - -prune build -prune docs/_build -prune docs/api - -global-exclude *.pyc *.o diff --git a/ccdproc/conftest.py b/ccdproc/conftest.py new file mode 100644 index 00000000..38a3277b --- /dev/null +++ b/ccdproc/conftest.py @@ -0,0 +1,35 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +# this contains imports plugins that configure py.test for astropy tests. +# by importing them here in conftest.py they are discoverable by py.test +# no matter how it is invoked within the source tree. + +try: + # When the pytest_astropy_header package is installed + from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS + + def pytest_configure(config): + config.option.astropy_header = True + +except ImportError: + PYTEST_HEADER_MODULES = {} + TESTED_VERSIONS = {} + + +from .tests.pytest_fixtures import ( + triage_setup, # noqa: F401 this is used in tests +) + +# This is to figure out ccdproc version, rather than using Astropy's +try: + from ccdproc import __version__ as version +except ImportError: + version = "dev" + +TESTED_VERSIONS["ccdproc"] = version + +# Add astropy to test header information and remove unused packages. +PYTEST_HEADER_MODULES["Astropy"] = "astropy" +PYTEST_HEADER_MODULES["astroscrappy"] = "astroscrappy" +PYTEST_HEADER_MODULES["reproject"] = "reproject" +PYTEST_HEADER_MODULES.pop("h5py", None) diff --git a/conftest.py b/conftest.py index bf01a714..c4fdb9e5 100644 --- a/conftest.py +++ b/conftest.py @@ -15,11 +15,6 @@ def pytest_configure(config): PYTEST_HEADER_MODULES = {} TESTED_VERSIONS = {} - -from ccdproc.tests.pytest_fixtures import ( - triage_setup, # noqa: F401 this is used in tests -) - # This is to figure out ccdproc version, rather than using Astropy's try: from ccdproc import __version__ as version diff --git a/pyproject.toml b/pyproject.toml index e1c78c10..b1f70b73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,8 @@ version-file = "ccdproc/_version.py" [tool.hatch.build.targets.sdist] include = [ "/ccdproc", + "/docs", + "/licenses", ] [tool.black] @@ -72,6 +74,8 @@ extend-exclude = ''' "*/ccdproc/*setup*", "*/ccdproc/*/tests/*", "*/ccdproc/tests/*", + "*/conftest.py", + "*/ccdproc/conftest.py" ] [tool.coverage.report]