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
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
# cp38 dropped: Python 3.8 is EOL and its leg fails outright.
python-version: [cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
runs-on: ubuntu-latest
env:
py: /opt/python/${{ matrix.python-version }}/bin/python
img: quay.io/pypa/manylinux2014_aarch64
# manylinux_2_28, not manylinux2014: cbor2 (a hard dependency via
# autobahn) ships only manylinux_2_28 aarch64 wheels for cp311+, so the
# 2014 (glibc 2.17) container can't use them and falls back to a
# from-source C build that fails under QEMU.
img: quay.io/pypa/manylinux_2_28_aarch64

steps:

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
],
ext_modules=extensions,
install_requires=install_requires,
python_requires=">=3.7",
python_requires=">=3.8",
package_data={'vpython': ['vpython_data/*',
'vpython_libraries/*',
'vpython_libraries/images/*']},
Expand Down
13 changes: 8 additions & 5 deletions vpython/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
from pkg_resources import get_distribution, DistributionNotFound
# importlib.metadata, not pkg_resources: fresh Python 3.12+ environments no
# longer ship setuptools, so `import pkg_resources` raises ModuleNotFoundError
# the moment `import vpython` runs (caught by CI's macos-3.12 leg).
from importlib.metadata import version as _dist_version, PackageNotFoundError

from .gs_version import glowscript_version

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = _dist_version(__name__)
except PackageNotFoundError:
# package is not installed
pass
__gs_version__ = glowscript_version()

del glowscript_version
del get_distribution
del DistributionNotFound
del _dist_version
del PackageNotFoundError

# Keep the remaining imports later to ensure that __version__ and
# __gs_version__ exist before importing vpython, which itself imports
Expand Down
Loading