Skip to content

Commit

Permalink
ensure extension modules are present in built wheel (#1794)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed May 10, 2024
1 parent 76a3e27 commit 204588a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Expand Up @@ -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 }}
15 changes: 1 addition & 14 deletions drizzlepac/__init__.py
Expand Up @@ -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.")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Expand Up @@ -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',
Expand Down

0 comments on commit 204588a

Please sign in to comment.