From bd7e24cb8902124eb44f450f2b2b62318731c361 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Tue, 9 Jan 2024 04:13:03 +0900 Subject: [PATCH] Use setuptools_scm for versioning. --- README.md | 5 +++-- pyproject.toml | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2e6d9c2..102ac96 100644 --- a/README.md +++ b/README.md @@ -120,8 +120,9 @@ $ LD_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so) python FILE.py ### Releasing -* bump version in `setup.py` -* tag it: `git tag vX.Y.` +Version is created automatically using `setuptools_scm`. + +* tag it: `git tag vX.Y.Z` * push tag: `git push --tags` diff --git a/pyproject.toml b/pyproject.toml index 7bac1ba..a7eaef7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,11 @@ [build-system] requires = [ - "setuptools>=42", + # NOTE: setuptools_scm>=8 is not supported in py3.6 cibuildwheel env. + # so use older setuptools_scm for a while + #"setuptools>=64", + #"setuptools_scm>=8", + "setuptools>=45", + "setuptools_scm[toml]>=6.2", "wheel", "pybind11>=2.10.0", ] @@ -12,7 +17,7 @@ line-length = 140 [project] name = "jagger" -# look into version in setuo.py +# Use setuptools_scm dynamic = ["version"] readme = {file = "README.md", content-type = "text/markdown"} @@ -20,3 +25,10 @@ readme = {file = "README.md", content-type = "text/markdown"} [project.scripts] jagger = "jagger:main" + +[tool.setuptools_scm] +# setuptools_scm>=8 +#version_file = "jagger/_version.py" + +# setuptools_scm<8 +write_to = "jagger/_version.py"