From 1cd895b193198d26bd2e572a40cffe344531f663 Mon Sep 17 00:00:00 2001 From: mwerlen Date: Mon, 11 Mar 2024 21:25:17 +0100 Subject: [PATCH] Switch from the deprecated distutils (removed in python 3.12) to setuptools and the build command --- .github/workflows/pypi.yaml | 4 ++-- .github/workflows/pytest.yaml | 2 ++ setup.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 07b2108..806ae60 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v2 - run: python -m pip install --upgrade pip - - run: python -m pip install flake8 pytest + - run: python -m pip install flake8 pytest build - run: python -m pytest -v - run: flake8 . - - run: python setup.py sdist + - run: python -m build --sdist - uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 2e5f756..96eb9d0 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -22,6 +22,8 @@ jobs: - '3.8' - '3.9' - '3.10' + - '3.11' + - '3.12' steps: - uses: actions/checkout@v2 - run: python -m pip install --upgrade pip diff --git a/setup.py b/setup.py index e6a41d1..1793c98 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ import os import re -from distutils.core import setup +from setuptools import setup dirname = os.path.dirname(os.path.abspath(__file__)) src = open(os.path.join(dirname, '{}.py'.format(__doc__))).read()