Skip to content

Commit 94a65ec

Browse files
authored
Merge pull request #289 from vpython/fix/ci-matrix
fix(ci): green the matrix — importlib.metadata, manylinux_2_28, drop cp38
2 parents b2ddae8 + 6594342 commit 94a65ec

3 files changed

Lines changed: 16 additions & 8 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: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
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()
1114

1215
del glowscript_version
13-
del get_distribution
14-
del DistributionNotFound
16+
del _dist_version
17+
del PackageNotFoundError
1518

1619
# Keep the remaining imports later to ensure that __version__ and
1720
# __gs_version__ exist before importing vpython, which itself imports

0 commit comments

Comments
 (0)