Skip to content

Commit

Permalink
ensure extension modules are present in built wheel (#146)
Browse files Browse the repository at this point in the history
* add test command to import c extension modules

* add comment about test_command in cibuildwheel

* fix style
  • Loading branch information
zacharyburnett authored May 17, 2024
1 parent adbb79f commit 7b28495
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- cp3*-win32
- cp3*-win_amd64
sdist: true
test_command: python -c "from drizzle import cdrizzle"
secrets:
pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}

1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# be accessible, and the documentation will not build correctly.

import datetime
import os
import sys
from pathlib import Path

Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ norecursedirs = [

[tool.ruff]
line-length = 100
extend-select = [

[tool.ruff.lint]
select = [
"F",
"W",
"E",
"C4",
"COM",
]
extend-exclude = [
exclude = [
"docs",
".eggs",
".tox",
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def get_extensions():
cfg['define_macros'].append(('__STDC__', 1))
cfg['define_macros'].append(('_CRT_SECURE_NO_WARNINGS', None))

# 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
return [Extension(str('drizzle.cdrizzle'), sources, **cfg)]


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ changedir = {toxinidir}
deps =
ruff
commands =
ruff . {posargs}
ruff check . {posargs}

[testenv:check-security]
description = run bandit to check security compliance
Expand Down

0 comments on commit 7b28495

Please sign in to comment.