Skip to content

Commit 75066b5

Browse files
authored
Merge pull request #111 from keszybz/setuptools-compat
make: fix compat with setuptools >= 61
2 parents f868a56 + 23b329d commit 75066b5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
"3.8",
2323
"3.9",
2424
"3.10",
25+
"3.11.0-rc.1",
2526
]
2627
name: Python ${{ matrix.python }}
2728
steps:

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ VERSION := $(shell $(PYTHON) setup.py --version)
77
TESTFLAGS = -v
88

99
define buildscript
10-
import sys,sysconfig
11-
print("build/lib.{}-{}.{}".format(sysconfig.get_platform(), *sys.version_info[:2]))
10+
import sys, sysconfig, setuptools
11+
sversion = int(setuptools.__version__.split(".")[0])
12+
end = sys.implementation.cache_tag if sversion >= 61 else "{}.{}".format(*sys.version_info[:2])
13+
print("build/lib.{}-{}".format(sysconfig.get_platform(), end))
1214
endef
1315

1416
builddir := $(shell $(PYTHON) -c '$(buildscript)')

0 commit comments

Comments
 (0)