Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,30 @@ jobs:
run: |
pip install wheel twine
python setup.py sdist bdist_wheel
python - <<'PY'
import pathlib
import zipfile

wheel_paths = sorted(pathlib.Path("dist").glob("*.whl"))
if not wheel_paths:
raise SystemExit("No wheel was built in dist/")

wheel_path = wheel_paths[-1]
with zipfile.ZipFile(wheel_path) as archive:
entry_points = [
name for name in archive.namelist()
if name.endswith("entry_points.txt")
]
if not entry_points:
raise SystemExit(f"{wheel_path.name} is missing entry_points.txt")

contents = archive.read(entry_points[0]).decode()
expected = "sidpy-mcp = sidpy.proc.mcp_server_beps:main"
if expected not in contents:
raise SystemExit(
f"{wheel_path.name} does not declare the sidpy-mcp console script"
)

print(f"Verified {wheel_path.name} includes sidpy-mcp")
PY
twine upload --username "__token__" --password $PYPI_TOKEN_PASSWORD dist/*
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ test =
pytest
pytest-cov
SciFiReaders
aicspylibczi
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
include_package_data=True,
# https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies
extras_require={
'MPI': ["mpi4py"], 'test': ["pytest", "pytest-cov", "SciFiReaders"]
'MPI': ["mpi4py"],
'test': ["pytest", "pytest-cov", "SciFiReaders", "aicspylibczi"],
},
# If there are data files included in your packages that need to be
# installed, specify them here. If using Python 2.6 or less, then these
Expand All @@ -89,9 +90,9 @@
# To provide executable scripts, use entry points in preference to the
# "scripts" keyword. Entry points provide cross-platform support and allow
# pip to create the appropriate form of executable for the target platform.
# entry_points={
# 'console_scripts': [
# 'sample=sample:main',
# ],
# },
entry_points={
'console_scripts': [
'sidpy-mcp=sidpy.proc.mcp_server_beps:main',
],
},
)
Loading