diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 654bc97d6..ea72c540d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,5 +19,6 @@ jobs: # Until we have arm64 runners, we can't automatically test arm64 wheels # - cp3*-macosx_arm64 sdist: true + test_command: python -c "from drizzlepac import cdriz" secrets: pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }} diff --git a/drizzlepac/__init__.py b/drizzlepac/__init__.py index fb830e3e5..1ae2c5537 100644 --- a/drizzlepac/__init__.py +++ b/drizzlepac/__init__.py @@ -17,21 +17,8 @@ import os import re import sys -from pkg_resources import get_distribution, DistributionNotFound - -__version_commit__ = '' -_regex_git_hash = re.compile(r'.*\+g(\w+)') - -try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: - __version__ = 'dev' - -if '+' in __version__: - commit = _regex_git_hash.match(__version__).groups() - if commit: - __version_commit__ = commit[0] +from .version import __version__ #if sys.version_info < (3, 8): # raise ImportError("Drizzlepac requires Python 3.8 and above.") diff --git a/pyproject.toml b/pyproject.toml index caa92727e..b18378763 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ 'scipy', 'matplotlib', 'stsci.tools>=4.0', - 'stsci.image>=2.3.4', + 'stsci.image>=2.3.7', 'stsci.imagestats', 'stsci.skypac>=1.0.9', 'stsci.stimage', @@ -87,6 +87,7 @@ requires = ["setuptools>=61", build-backend = "setuptools.build_meta" [tool.setuptools_scm] +version_file = "drizzlepac/version.py" [tool.setuptools] zip-safe = false diff --git a/setup.py b/setup.py index db27159da..01c07b8a1 100755 --- a/setup.py +++ b/setup.py @@ -29,6 +29,8 @@ ('__STDC__', 1) ] +# importing these extension modules is tested in `.github/workflows/build.yml`; +# when adding new modules here, make sure to add them to the `test_command` entry there ext_modules = [ Extension( 'drizzlepac.cdriz',