From 1223712ae394c406dc83fe245fb89739e8e8df47 Mon Sep 17 00:00:00 2001 From: David Szotten Date: Wed, 11 Oct 2023 10:10:40 +0100 Subject: [PATCH] Add Python 3.12 support (#286) Add py3.12 to classifiers, change to setuptools, add setuptools to requirements --- .github/workflows/ci.yml | 2 +- bin/runbench.py | 4 ++-- requirements_test.txt | 1 + setup.py | 3 ++- tox.ini | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6229457..32843c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9"] os: [ubuntu-latest] runs-on: ${{ matrix.os }} name: "${{ matrix.os }} Python: ${{ matrix.python-version }}" diff --git a/bin/runbench.py b/bin/runbench.py index c0dca20..d4c01c4 100755 --- a/bin/runbench.py +++ b/bin/runbench.py @@ -18,8 +18,8 @@ def build_lib_dirname(): - from distutils.dist import Distribution - from distutils.command.build import build + from setuptools import Distribution + from setuptools.command import build build_cmd = build(Distribution({"ext_modules": True})) build_cmd.finalize_options() return build_cmd.build_lib diff --git a/requirements_test.txt b/requirements_test.txt index e079f8a..27472ef 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1 +1,2 @@ pytest +setuptools diff --git a/setup.py b/setup.py index 535ff78..ba27e93 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import os import sys -from distutils.core import setup, Extension +from setuptools import setup, Extension ## Command-line argument parsing @@ -121,6 +121,7 @@ def append_env(L, e): 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3 :: Only', ], ) diff --git a/tox.ini b/tox.ini index 5108697..ea832f2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = py{37,38,39,310,311} +envlist = py{37,38,39,310,311,312} [testenv] +allowlist_externals = {toxinidir}/bin/runtests.py commands = {toxinidir}/bin/runtests.py deps = pytest