Skip to content

Commit 31ed45b

Browse files
sspickleclaude
andcommitted
fix(ci): green the matrix — importlib.metadata, manylinux_2_28, drop cp38
Three failures on an untouched master (#288), three causes: 1. macos-3.12: `import vpython` itself was broken on fresh 3.12+ environments — vpython/__init__.py imported pkg_resources, and Python 3.12 no longer ships setuptools into new environments. Replaced with stdlib importlib.metadata (3.8+), and python_requires bumped 3.7→3.8 to match. This is a real user-facing bug, not just a CI one: anyone on a clean 3.12 install hits it. 2. aarch64 cp311/cp312: cbor2 — a hard dependency via autobahn — ships only manylinux_2_28 aarch64 wheels for cp311+, so the manylinux2014 (glibc 2.17) container could not use them and fell back to building the C extension from source under QEMU, which fails. Container moved to quay.io/pypa/manylinux_2_28_aarch64. 3. aarch64 cp38: Python 3.8 is EOL and the leg fails outright. Dropped. The windows 3.8/3.9 legs still pass and are left alone — retiring them is a support-policy decision, not a CI repair. Closes #288. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7y9rTA1r8r8EhEnPSQenR
1 parent b2ddae8 commit 31ed45b

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,16 @@ jobs:
8282
strategy:
8383
fail-fast: false
8484
matrix:
85-
python-version: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
85+
# cp38 dropped: Python 3.8 is EOL and its leg fails outright.
86+
python-version: [cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
8687
runs-on: ubuntu-latest
8788
env:
8889
py: /opt/python/${{ matrix.python-version }}/bin/python
89-
img: quay.io/pypa/manylinux2014_aarch64
90+
# manylinux_2_28, not manylinux2014: cbor2 (a hard dependency via
91+
# autobahn) ships only manylinux_2_28 aarch64 wheels for cp311+, so the
92+
# 2014 (glibc 2.17) container can't use them and falls back to a
93+
# from-source C build that fails under QEMU.
94+
img: quay.io/pypa/manylinux_2_28_aarch64
9095

9196
steps:
9297

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
],
3838
ext_modules=extensions,
3939
install_requires=install_requires,
40-
python_requires=">=3.7",
40+
python_requires=">=3.8",
4141
package_data={'vpython': ['vpython_data/*',
4242
'vpython_libraries/*',
4343
'vpython_libraries/images/*']},

vpython/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
from pkg_resources import get_distribution, DistributionNotFound
1+
# importlib.metadata, not pkg_resources: fresh Python 3.12+ environments no
2+
# longer ship setuptools, so `import pkg_resources` raises ModuleNotFoundError
3+
# the moment `import vpython` runs (caught by CI's macos-3.12 leg).
4+
from importlib.metadata import version as _dist_version, PackageNotFoundError
25

36
from .gs_version import glowscript_version
47

58
try:
6-
__version__ = get_distribution(__name__).version
7-
except DistributionNotFound:
9+
__version__ = _dist_version(__name__)
10+
except PackageNotFoundError:
811
# package is not installed
912
pass
1013
__gs_version__ = glowscript_version()

0 commit comments

Comments
 (0)