aboutsummaryrefslogtreecommitdiffstats
path: root/pyproject.toml
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2022-05-30 23:31:12 -0700
committerGravatar MarkKoz <[email protected]>2022-05-31 00:01:33 -0700
commit67edafa0062582e4eec47c59d05a7b4b2429f435 (patch)
tree94297eba9752bdb517e745cc19f1398ac0a93e77 /pyproject.toml
parentAdd __all__ to all modules (diff)
Automatically determine the package version
Use the HEAD commit's date as the package's version. Append the number of commits made on the same date as HEAD to ensure multiple releases on the same date still have unique versions.
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml10
1 files changed, 7 insertions, 3 deletions
diff --git a/pyproject.toml b/pyproject.toml
index ac28b6e..c839da5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,10 +1,9 @@
[build-system]
-requires = ["setuptools>=61"]
-build-backend = "setuptools.build_meta"
+requires = ["setuptools>=61", "setuptools-git-versioning>=1.8"]
+build-backend = "setuptools.build_meta:__legacy__"
[project]
name = "snekbox"
-version = "1.0.0"
description = "HTTP REST API for sanboxed execution of arbitrary Python code."
readme = "README.md"
license = {text = "MIT"}
@@ -22,6 +21,7 @@ classifiers = [
"Topic :: Security",
"Topic :: Software Development :: Interpreters",
]
+dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [
@@ -45,6 +45,10 @@ snekbox = "snekbox.__main__:main"
[tool.setuptools]
packages = ["snekbox"]
+[tool.setuptools-git-versioning]
+enabled = true
+version_callback = "scripts.version:get_version"
+
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",