From 94b9c7216a408cae9c3b816c91841cae3585fdd3 Mon Sep 17 00:00:00 2001 From: DoronZ Date: Mon, 11 Mar 2024 22:01:08 +0200 Subject: [PATCH] pyproject: add `setuptools-scm` --- .gitignore | 1 + pyproject.toml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 894b14d..8327840 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .DS_Store *.egg-info __pycache__ +applecatalog/_version.py diff --git a/pyproject.toml b/pyproject.toml index 32f100f..2c7cfac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [project] name = "applecatalog" -version = "2.0.2" description = "AppleCatalog download agent" readme = "README.md" requires-python = ">=3.8" @@ -22,7 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3 :: Only", ] -dynamic = ["dependencies"] +dynamic = ["dependencies", "version"] [project.optional-dependencies] test = ["pytest"] @@ -39,7 +38,11 @@ exclude = ["docs*", "tests*"] [tool.setuptools.dynamic] dependencies = { file = ["requirements.txt"] } +version = {attr = "applecatalog._version.__version__"} + +[tool.setuptools_scm] +version_file = "applecatalog/_version.py" [build-system] -requires = ["setuptools>=43.0.0", "wheel"] +requires = ["setuptools>=43.0.0", "setuptools_scm>=8", "wheel"] build-backend = "setuptools.build_meta"