File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 run : |
9696 pip install wheel twine
9797 python setup.py sdist bdist_wheel
98+ python - <<'PY'
99+ import pathlib
100+ import zipfile
101+
102+ wheel_paths = sorted(pathlib.Path("dist").glob("*.whl"))
103+ if not wheel_paths:
104+ raise SystemExit("No wheel was built in dist/")
105+
106+ wheel_path = wheel_paths[-1]
107+ with zipfile.ZipFile(wheel_path) as archive:
108+ entry_points = [
109+ name for name in archive.namelist()
110+ if name.endswith("entry_points.txt")
111+ ]
112+ if not entry_points:
113+ raise SystemExit(f"{wheel_path.name} is missing entry_points.txt")
114+
115+ contents = archive.read(entry_points[0]).decode()
116+ expected = "sidpy-mcp = sidpy.proc.mcp_server_beps:main"
117+ if expected not in contents:
118+ raise SystemExit(
119+ f"{wheel_path.name} does not declare the sidpy-mcp console script"
120+ )
121+
122+ print(f"Verified {wheel_path.name} includes sidpy-mcp")
123+ PY
98124 twine upload --username "__token__" --password $PYPI_TOKEN_PASSWORD dist/*
Original file line number Diff line number Diff line change 8989 # To provide executable scripts, use entry points in preference to the
9090 # "scripts" keyword. Entry points provide cross-platform support and allow
9191 # pip to create the appropriate form of executable for the target platform.
92- # entry_points={
93- # 'console_scripts': [
94- # 'sample=sample :main',
95- # ],
96- # },
92+ entry_points = {
93+ 'console_scripts' : [
94+ 'sidpy-mcp=sidpy.proc.mcp_server_beps :main' ,
95+ ],
96+ },
9797)
You can’t perform that action at this time.
0 commit comments