Repository: matze/pkgconfig (language: python)

Issue:
Tests fail on Python 3.12 due to distutils removal
The distutils module has been removed from Python in 3.12, so the tests are now failing like this:

```pytb
============================= test session starts ==============================
platform linux -- Python 3.12.0, pytest-7.4.2, pluggy-1.3.0
rootdir: /build/source
collected 0 items / 1 error                                                    

==================================== ERRORS ====================================
______________________ ERROR collecting test_pkgconfig.py ______________________
ImportError while importing test module '/build/source/test_pkgconfig.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/xcr4d0ng894lbl9s874any12p7abg6iq-python3-3.12.0/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test_pkgconfig.py:1: in <module>
    from distutils.core import Extension
E   ModuleNotFoundError: No module named 'distutils'
=========================== short test summary info ============================
ERROR test_pkgconfig.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.08s ===============================


Discussion / hints:
+1

Fix patch:
diff --git a/tox.ini b/tox.ini
index 973724f..028b798 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,9 @@
 [tox]
-envlist = py{26,27,33,34,35,36,37}
+# see also tool.poetry.dependencies
+envlist = py{33,34,35,36,37,38,39,310,311,312}
 
 [testenv]
-deps = pytest
+deps =
+    pytest
+    setuptools
 commands= pytest


Test patch:
diff --git a/test_pkgconfig.py b/test_pkgconfig.py
index 0dfe0d1..7f7a9ff 100644
--- a/test_pkgconfig.py
+++ b/test_pkgconfig.py
@@ -1,4 +1,4 @@
-from distutils.core import Extension
+from setuptools import Extension
 import os
 import pytest
 import pkgconfig