summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
diff options
context:
space:
mode:
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml33
1 files changed, 18 insertions, 15 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 0e7d843..51b6a80 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
[project]
# https://peps.python.org/pep-0621/#readme
requires-python = ">=3.9"
-dynamic = ["version"]
+dynamic = ["version", "dependencies", "optional-dependencies"]
name = "ansible-compat"
description = "Ansible compatibility goodies"
readme = "README.md"
@@ -36,23 +36,10 @@ classifiers = [
"Topic :: Utilities"
]
keywords = ["ansible"]
-dependencies = [
- # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html
- "ansible-core>=2.12",
- "packaging",
- "PyYAML",
- "subprocess-tee>=0.4.1",
- "jsonschema>=4.6.0",
- "typing-extensions>=4.5.0;python_version<'3.10'"
-]
-
-[project.optional-dependencies]
-docs = ["argparse-manpage", "black", "mkdocs-ansible[lock]>=0.1.2"]
-test = ["coverage", "pip-tools", "pytest>=7.2.0", "pytest-mock", "pytest-plus>=0.6.1"]
[project.urls]
homepage = "https://github.com/ansible/ansible-compat"
-documentation = "https://ansible-compat.readthedocs.io/"
+documentation = "https://ansible.readthedocs.io/projects/compat/"
repository = "https://github.com/ansible/ansible-compat"
changelog = "https://github.com/ansible/ansible-compat/releases"
@@ -160,6 +147,22 @@ known-third-party = ["packaging"]
[tool.ruff.pydocstyle]
convention = "pep257"
+[tool.setuptools.dynamic]
+dependencies = {file = [".config/requirements.in"]}
+optional-dependencies.docs = {file = [".config/requirements-docs.in"]}
+optional-dependencies.test = {file = [".config/requirements-test.in"]}
+
[tool.setuptools_scm]
local_scheme = "no-local-version"
+tag_regex = "^(?P<prefix>v)?(?P<version>\\d+[^\\+]*)(?P<suffix>.*)?$"
write_to = "src/ansible_compat/_version.py"
+# To prevent accidental pick of mobile version tags such 'v6'
+git_describe_command = [
+ "git",
+ "describe",
+ "--dirty",
+ "--tags",
+ "--long",
+ "--match",
+ "v*.*"
+]