Skip to content

Commit

Permalink
Update Python versions: drop 3.8, add 3.13 to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
miek committed Dec 5, 2024
1 parent d7cb255 commit f6b5998
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
max-parallel: 5
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'

name: test (${{ matrix.python-version }})
steps:
Expand Down
7 changes: 2 additions & 5 deletions apollo_fpga/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .onboard_jtag import *

import importlib.metadata
import importlib.resources
__version__ = importlib.metadata.version(__package__)


Expand Down Expand Up @@ -168,11 +169,7 @@ def _init_backend(cls):
# In Windows, we need to specify the libusb library location to create a backend.
if platform.system() == "Windows":
# Determine the path to libusb-1.0.dll.
try:
from importlib_resources import files # <= 3.8
except:
from importlib.resources import files # >= 3.9
libusb_dll = os.path.join(files("usb1"), "libusb-1.0.dll")
libusb_dll = os.path.join(importlib.resources.files("usb1"), "libusb-1.0.dll")

# Create a backend by explicitly passing the path to libusb_dll.
cls.backend = usb.backend.libusb1.get_backend(find_library=lambda x: libusb_dll)
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
license = { text = "BSD" }
description = "Python library and host tools for Apollo FPGA debug controllers."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
'Programming Language :: Python',
'Development Status :: 5 - Production/Stable',
Expand All @@ -24,7 +24,6 @@ classifiers = [
'Topic :: Scientific/Engineering',
]
dependencies = [
"importlib_resources; python_version<'3.9'",
"pyusb>1.1.1",
"pyvcd>=0.2.4",
"prompt-toolkit>3.0.16",
Expand Down

0 comments on commit f6b5998

Please sign in to comment.