Skip to content

Commit

Permalink
Merge pull request #12604 from vojtapolasek/add_ssg_poetry
Browse files Browse the repository at this point in the history
Add pyproject.toml for the ssg package
  • Loading branch information
marcusburghardt authored Nov 29, 2024
2 parents 878f563 + d5f2628 commit 16eaa39
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "ssg"
description = "Library used while building and maintaining the ComplianceasCode/content project"
dynamic = ["version"]
dependencies = [
"pyyaml",
"Jinja2",
"setuptools"
]
requires-python = ">= 3"
maintainers = [
{name = "Gabriel Gaspar Becker", email = "[email protected]"},
{name = "Jan Cerny", email = "[email protected]"},
{name = "Marcus Burghardt", email = "[email protected]"},
{name = "Matthew Burket", email = "[email protected]"},
{name = "Matus Marhefka", email = "[email protected]"},
{name = "Vojtech Polasek", email = "[email protected]"}
]
readme = "README.md"
license = {file = "LICENSE"}

[project.urls]
Homepage = "https://github.com/ComplianceAsCode/content"
Documentation = "https://complianceascode.readthedocs.io/en/latest/"


[tool.setuptools_scm]
# The ComplianceasCode/content uses git tag in an uncommon way.
# That's why this elaborate command is used to get somehow meaningful version.
# The project uses tags, but they describe commits which are not in the master branch.
# Instead, they describe commits which are marked as final in stabilization branches.
# These branches are temporary and they are deleted after stabilization finishes.
# That is the reason why the regular "git describe --long" command cannot be used in this place.
# Instead the latest tag is selected with some heuristics added, stored in the $tag variable.
# Then number of commits between the tag and the current head is calculated and stored in the $numcommits variable.
# Then the HEAD short commit hash is added.
git_describe_command = ["sh", "-c", "tag=$(git tag | grep -v '-' | sort | tail -n 1); numcommits=$(git rev-list --count $tag..HEAD); com=$(git log -1 --pretty=format:%h); echo $tag-$numcommits-$com"]

[tool.setuptools.packages.find]
include = ["ssg*"]

0 comments on commit 16eaa39

Please sign in to comment.