Skip to content

Commit

Permalink
Merge pull request #111 from keszybz/setuptools-compat
Browse files Browse the repository at this point in the history
make: fix compat with setuptools >= 61
  • Loading branch information
keszybz authored Aug 13, 2022
2 parents f868a56 + 23b329d commit 75066b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
"3.8",
"3.9",
"3.10",
"3.11.0-rc.1",
]
name: Python ${{ matrix.python }}
steps:
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ VERSION := $(shell $(PYTHON) setup.py --version)
TESTFLAGS = -v

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

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

0 comments on commit 75066b5

Please sign in to comment.