Skip to content

Commit 09053a2

Browse files
committed
make: fix compat with setuptools >= 61
Fixes #110.
1 parent f868a56 commit 09053a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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)