Skip to content

Commit 1e41160

Browse files
authored
Merge pull request #27 from karellen/issue_26
Ensure the import from setuptools succeeds
2 parents 2985d89 + 3481a92 commit 1e41160

File tree

6 files changed

+28
-15
lines changed

6 files changed

+28
-15
lines changed

.github/exclusions.json

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"python-version": "3.8",
4+
"setuptools-version": "75.7"
5+
},
6+
{
7+
"python-version": "3.8",
8+
"setuptools-version": "75.8"
9+
},
210
{
311
"python-version": "3.12",
412
"setuptools-version": "65.7"
@@ -20,27 +28,27 @@
2028
"pip-version": "22.3"
2129
},
2230
{
23-
"python-version": "3.13-dev",
31+
"python-version": "3.13",
2432
"setuptools-version": "65.7"
2533
},
2634
{
27-
"python-version": "3.13-dev",
35+
"python-version": "3.13",
2836
"setuptools-version": "65.7"
2937
},
3038
{
31-
"python-version": "3.13-dev",
39+
"python-version": "3.13",
3240
"setuptools-version": "64.0"
3341
},
3442
{
35-
"python-version": "3.13-dev",
43+
"python-version": "3.13",
3644
"setuptools-version": "63.4"
3745
},
3846
{
39-
"python-version": "3.13-dev",
47+
"python-version": "3.13",
4048
"setuptools-version": "62.6"
4149
},
4250
{
43-
"python-version": "3.13-dev",
51+
"python-version": "3.13",
4452
"pip-version": "22.3"
4553
}
4654
]

.github/workflows/build.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ jobs:
2020
pip-version:
2121
- '24.2'
2222
setuptools-version:
23-
- '75.1'
23+
- '75.8'
24+
- '75.7'
2425
- '74.1'
2526
- '73.0'
2627
- '72.1'
2728
- '71.1'
2829
- '70.3'
2930
- '69.5'
3031
wheel-version:
31-
- '0.44'
32+
- '0.45.1'
3233
- '0.42.0'
3334
env:
3435
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -70,7 +71,7 @@ jobs:
7071
python-version: '3.12'
7172
deploy: ${{ github.event_name == 'push' }}
7273
deploy-pip: '24.2'
73-
deploy-setuptools: '75.1'
74+
deploy-setuptools: '75.8'
7475
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
7576
secrets: inherit
7677
needs: [ read-exclusions ]
@@ -150,15 +151,15 @@ jobs:
150151
uses: ./.github/workflows/template.yml
151152
with:
152153
os: ubuntu-latest
153-
python-version: '3.13-dev'
154+
python-version: '3.13'
154155
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
155156
secrets: inherit
156157
needs: [ read-exclusions ]
157158
build-macos-py313:
158159
uses: ./.github/workflows/template.yml
159160
with:
160161
os: macos-13
161-
python-version: '3.13-dev'
162+
python-version: '3.13'
162163
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
163164
secrets: inherit
164165
needs: [ build-ubuntu-py313, read-exclusions ]

.github/workflows/template.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
- '23.3'
4545
- '22.3'
4646
setuptools-version:
47-
- '75.1'
47+
- '75.8'
48+
- '75.7'
4849
- '74.1'
4950
- '73.0'
5051
- '72.2'

build.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
use_plugin("filter_resources")
3131

3232
name = "wheel_axle"
33-
version = "0.0.9"
33+
version = "0.0.10.dev"
3434

3535
summary = "Axle is Python wheel enhancement library"
3636
authors = [Author("Karellen, Inc.", "supervisor@karellen.co")]
@@ -69,6 +69,7 @@ def set_properties(project):
6969
if "WHEEL_VER" not in environ:
7070
project.depends_on("wheel", ">=0.37.0")
7171
project.depends_on("wheel-axle-runtime", "<1.0,>0.0.5")
72+
project.build_depends_on("twine")
7273

7374
project.set_property("coverage_break_build", False)
7475
project.set_property("cram_fail_if_no_tests", False)

src/integrationtest/python/build_axle_tests.py

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def build_axle(self, dir_name, *extra_args):
8686
sys.argv.clear()
8787
sys.argv.extend(old_sys_argv)
8888

89+
check_call(["twine", "check", "--strict", f"{self.dist_dir}/*.whl"])
90+
8991
def install(self, wheel_file, user=False, deps=[]):
9092
check_call([sys.executable, "-m", "pip", "install", "--pre"] +
9193
(["--user", "--force-reinstall"] if user else []) +

src/main/python/wheel_axle/bdist_axle/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
try:
3737
# SetupTools >= 70.1
38-
from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel, python
39-
except ImportError:
38+
from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel, python_tag
39+
except ImportError as e:
4040
try:
4141
# Wheel >= 0.44.0
4242
from wheel._bdist_wheel import bdist_wheel as _bdist_wheel, python_tag

0 commit comments

Comments
 (0)