python: move most of setup.py to pyproject.toml

This commit is contained in:
link2xt
2022-07-11 23:20:57 +00:00
committed by holger krekel
parent 248d9600c5
commit ed5fc820c2
4 changed files with 38 additions and 53 deletions

View File

@@ -1,13 +0,0 @@
import os
import subprocess
import sys
if __name__ == "__main__":
assert len(sys.argv) == 2
wheelhousedir = sys.argv[1]
# pip wheel will build in an isolated tmp dir that does not have git
# history so setuptools_scm can not automatically determine a
# version there. So pass in the version through an env var.
version = subprocess.check_output(["python", "setup.py", "--version"]).strip().split(b"\n")[-1]
os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"] = version.decode("ascii")
subprocess.check_call(("pip wheel . -w %s" % wheelhousedir).split())