From d23a0fde5eeeeb3e2d7c0573b997a52ff6f0bd8b Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Wed, 17 Jun 2020 20:13:57 +0300 Subject: [PATCH] Moved some stuff from setup.py into pyproject.toml Improved stuff in setup.py a bit --- pyproject.toml | 7 +++++++ setup.py | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..2a5145f5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = ["setuptools>=41", "wheel", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] +write_to_template = "__version__ = \"{version}\"\n" +write_to = "parglare/version.py" diff --git a/setup.py b/setup.py index 8a45e878..145c12ce 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ if os.system("pip list | grep twine"): print("twine not installed.\nUse `pip install twine`.\nExiting.") sys.exit() - os.system("python setup.py sdist bdist_wheel") + os.system("python -m pep517 -bs .") if sys.argv[-1] == 'publishtest': os.system("twine upload -r test dist/*") else: @@ -21,7 +21,4 @@ sys.exit() if __name__ == "__main__": - setup(use_scm_version={ - "write_to": str(this_dir / "parglare" / "version.py"), - "write_to_template": '__version__ = "{version}"\n', - }) + setup()