From 83851898980544a8cddf63816b91dd3070f746d7 Mon Sep 17 00:00:00 2001 From: Karl-Petter Lindegaard Date: Sat, 16 Mar 2024 17:51:20 +0100 Subject: [PATCH 1/2] Python 3.12 build and test --- .github/workflows/python-build-test.yml | 8 +++++++- CHANGELOG.md | 2 +- setup.py | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-build-test.yml b/.github/workflows/python-build-test.yml index 50dfc9d..823dbf5 100644 --- a/.github/workflows/python-build-test.yml +++ b/.github/workflows/python-build-test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -22,6 +22,12 @@ jobs: run: | python -m pip install --upgrade pip pip install flake8 pytest + - name: Additional install for Python 3.12 or higher + if: ${{ matrix.python-version >= '3.12' }} + run: | + pip install setuptools + - name: Install smbus2 + run: | python setup.py install - name: Lint with flake8 run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 18799a6..2ef9cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Notable changes to the smbus2 project are recorded here. ## [Unreleased] -No changes since last release. +- Python 3.12 added. ## [0.4.3] - 2023-08-25 - Build pipeline and test updates only: diff --git a/setup.py b/setup.py index faa3117..2d64540 100644 --- a/setup.py +++ b/setup.py @@ -67,6 +67,7 @@ def find_version(*file_paths): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11" + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12" ], ) From 324d7f0fd02bfd3d35657bc4b05ec5b5078bc5d7 Mon Sep 17 00:00:00 2001 From: Karl-Petter Lindegaard Date: Sun, 24 Mar 2024 10:26:17 +0100 Subject: [PATCH 2/2] Cleaner setup.py --- setup.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 2d64540..4eeb38e 100644 --- a/setup.py +++ b/setup.py @@ -26,10 +26,6 @@ def find_version(*file_paths): README = read_file('README.md') version = find_version('smbus2', '__init__.py') -test_deps = [ - 'mock;python_version<"3.3"', - 'nose' -] setup( name="smbus2", @@ -50,8 +46,7 @@ def find_version(*file_paths): ], 'qa': [ 'flake8' - ], - 'test': test_deps + ] }, classifiers=[ "Development Status :: 4 - Beta", @@ -60,8 +55,6 @@ def find_version(*file_paths): "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8",