From 940651c2dec4451e4f9c970a21e8aabce417f501 Mon Sep 17 00:00:00 2001 From: Arcadiy Ivanov Date: Fri, 24 Jan 2025 23:44:38 -0500 Subject: [PATCH] Ensure the import from setuptools succeeds Bump version Bump testing versions of setuptools Add Python 3.13 proper Make sure to run `twine check --strict` during tests fixes #26 --- .github/exclusions.json | 12 ++++++------ .github/workflows/build.yml | 11 ++++++----- .github/workflows/template.yml | 3 ++- build.py | 3 ++- src/integrationtest/python/build_axle_tests.py | 2 ++ src/main/python/wheel_axle/bdist_axle/__init__.py | 4 ++-- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/exclusions.json b/.github/exclusions.json index 38b0146..6cceeac 100644 --- a/.github/exclusions.json +++ b/.github/exclusions.json @@ -20,27 +20,27 @@ "pip-version": "22.3" }, { - "python-version": "3.13-dev", + "python-version": "3.13", "setuptools-version": "65.7" }, { - "python-version": "3.13-dev", + "python-version": "3.13", "setuptools-version": "65.7" }, { - "python-version": "3.13-dev", + "python-version": "3.13", "setuptools-version": "64.0" }, { - "python-version": "3.13-dev", + "python-version": "3.13", "setuptools-version": "63.4" }, { - "python-version": "3.13-dev", + "python-version": "3.13", "setuptools-version": "62.6" }, { - "python-version": "3.13-dev", + "python-version": "3.13", "pip-version": "22.3" } ] \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f17550..455a048 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,8 @@ jobs: pip-version: - '24.2' setuptools-version: - - '75.1' + - '75.8' + - '75.7' - '74.1' - '73.0' - '72.1' @@ -28,7 +29,7 @@ jobs: - '70.3' - '69.5' wheel-version: - - '0.44' + - '0.45.1' - '0.42.0' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -70,7 +71,7 @@ jobs: python-version: '3.12' deploy: ${{ github.event_name == 'push' }} deploy-pip: '24.2' - deploy-setuptools: '75.1' + deploy-setuptools: '75.8' exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }} secrets: inherit needs: [ read-exclusions ] @@ -150,7 +151,7 @@ jobs: uses: ./.github/workflows/template.yml with: os: ubuntu-latest - python-version: '3.13-dev' + python-version: '3.13' exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }} secrets: inherit needs: [ read-exclusions ] @@ -158,7 +159,7 @@ jobs: uses: ./.github/workflows/template.yml with: os: macos-13 - python-version: '3.13-dev' + python-version: '3.13' exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }} secrets: inherit needs: [ build-ubuntu-py313, read-exclusions ] diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml index a60c41c..560d12f 100644 --- a/.github/workflows/template.yml +++ b/.github/workflows/template.yml @@ -44,7 +44,8 @@ jobs: - '23.3' - '22.3' setuptools-version: - - '75.1' + - '75.8' + - '75.7' - '74.1' - '73.0' - '72.2' diff --git a/build.py b/build.py index 557bb81..d97ccbd 100644 --- a/build.py +++ b/build.py @@ -30,7 +30,7 @@ use_plugin("filter_resources") name = "wheel_axle" -version = "0.0.9" +version = "0.0.10.dev" summary = "Axle is Python wheel enhancement library" authors = [Author("Karellen, Inc.", "supervisor@karellen.co")] @@ -69,6 +69,7 @@ def set_properties(project): if "WHEEL_VER" not in environ: project.depends_on("wheel", ">=0.37.0") project.depends_on("wheel-axle-runtime", "<1.0,>0.0.5") + project.build_depends_on("twine") project.set_property("coverage_break_build", False) project.set_property("cram_fail_if_no_tests", False) diff --git a/src/integrationtest/python/build_axle_tests.py b/src/integrationtest/python/build_axle_tests.py index b921f4b..a747130 100644 --- a/src/integrationtest/python/build_axle_tests.py +++ b/src/integrationtest/python/build_axle_tests.py @@ -86,6 +86,8 @@ def build_axle(self, dir_name, *extra_args): sys.argv.clear() sys.argv.extend(old_sys_argv) + check_call(["twine", "check", "--strict", f"{self.dist_dir}/*.whl"]) + def install(self, wheel_file, user=False, deps=[]): check_call([sys.executable, "-m", "pip", "install", "--pre"] + (["--user", "--force-reinstall"] if user else []) + diff --git a/src/main/python/wheel_axle/bdist_axle/__init__.py b/src/main/python/wheel_axle/bdist_axle/__init__.py index 341a604..3d3e205 100644 --- a/src/main/python/wheel_axle/bdist_axle/__init__.py +++ b/src/main/python/wheel_axle/bdist_axle/__init__.py @@ -35,8 +35,8 @@ try: # SetupTools >= 70.1 - from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel, python -except ImportError: + from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel, python_tag +except ImportError as e: try: # Wheel >= 0.44.0 from wheel._bdist_wheel import bdist_wheel as _bdist_wheel, python_tag