diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3406a9..9df2f28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: - python-version: "3.9" + python-version: "3.13" - id: cache uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 diff --git a/publish.py b/publish.py index aee86f4..cc3ddac 100644 --- a/publish.py +++ b/publish.py @@ -57,9 +57,11 @@ async def upload_with_twine( } python_path = os.path.join(virtualenv_dir, "bin", "python") + pip_path = os.path.join(virtualenv_dir, "bin", "pip") twine_path = os.path.join(virtualenv_dir, "bin", "twine") # Create source distribution and wheel. + await call([pip_path, "install", "setuptools"], env=environ, cwd=project_dir) await call([python_path, "setup.py", "sdist"], env=environ, cwd=project_dir) await call([python_path, "setup.py", "bdist_wheel"], env=environ, cwd=project_dir) dist_files = os.listdir(os.path.join(project_dir, "dist")) diff --git a/release.py b/release.py index a311e8f..6c47ea0 100644 --- a/release.py +++ b/release.py @@ -4,7 +4,7 @@ import os from subprocess import CalledProcessError -from pkg_resources import parse_version +from packaging.version import parse from async_subprocess import ( call, @@ -235,7 +235,7 @@ async def release( working_dir=working_dir, readonly=False, ) - if parse_version(old_version) >= parse_version(new_version): + if parse(old_version) >= parse(new_version): raise ReleaseException( f"old version is {old_version} but the new version {new_version} is not newer" ) diff --git a/requirements.txt b/requirements.txt index 15f9f74..414cc24 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ requests sentry-sdk tornado virtualenv +packaging