This is an automated email from the ASF dual-hosted git repository.

tn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 2f890cb  move dunamai to a dev only dependency
2f890cb is described below

commit 2f890cbe867db45cde83fd258bfcd6bcaddc6535
Author: Thomas Neidhart <[email protected]>
AuthorDate: Tue Mar 18 18:47:03 2025 +0100

    move dunamai to a dev only dependency
---
 Dockerfile.alpine | 6 +++++-
 atr/metadata.py   | 3 ++-
 poetry.lock       | 6 +++---
 pyproject.toml    | 3 ++-
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 2e98746..2caa41b 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -19,11 +19,15 @@ WORKDIR /opt/atr
 
 COPY . .
 
-RUN make sync PYTHON="$(which python3)"
+# install development dependencies to generate version
+RUN make sync-dev
 
 # generate a _version.py module from git information
 RUN make generate-version
 
+# only install runtime dependencies
+RUN make sync
+
 # final image
 FROM python:3.13.2-alpine3.21
 
diff --git a/atr/metadata.py b/atr/metadata.py
index 72c0841..9c66303 100644
--- a/atr/metadata.py
+++ b/atr/metadata.py
@@ -30,12 +30,13 @@ def _get_version_from_git() -> tuple[str, str] | None:
         # We start in state/, so we need to go up one level
         version = Version.from_git()
         if version.distance > 0:
+            dirty = "+dirty" if version.dirty else ""
             # The development version number should reflect the next release 
that is going to be cut,
             # indicating how many commits have already going into that since 
the last release.
             # e.g. v0.2.0.dev100-abcdef means that there have been already 100 
commits since the last release
             # (which presumably was 0.1.x). We explicitly bump the minor 
version for the next release.
             # The commit hash is added to the version string for convenience 
reasons.
-            return 
version.bump(1).serialize(format="v{base}.dev{distance}-{commit}"), 
version.serialize(
+            return 
f"{version.bump(1).serialize(format='v{base}.dev{distance}-{commit}')}{dirty}", 
version.serialize(
                 format="{commit}"
             )
             # another option is to do a format like "v0.1.0+100.abcdef" which 
indicates that that version
diff --git a/poetry.lock b/poetry.lock
index 85e58fd..2e3395a 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -772,7 +772,7 @@ version = "1.23.0"
 description = "Dynamic version generation"
 optional = false
 python-versions = ">=3.5"
-groups = ["main"]
+groups = ["dev"]
 files = [
     {file = "dunamai-1.23.0-py3-none-any.whl", hash = 
"sha256:a0906d876e92441793c6a423e16a4802752e723e9c9a5aabdc5535df02dbe041"},
     {file = "dunamai-1.23.0.tar.gz", hash = 
"sha256:a163746de7ea5acb6dacdab3a6ad621ebc612ed1e528aaa8beedb8887fccd2c4"},
@@ -1574,7 +1574,7 @@ version = "24.2"
 description = "Core utilities for Python packages"
 optional = false
 python-versions = ">=3.8"
-groups = ["main", "test"]
+groups = ["dev", "test"]
 files = [
     {file = "packaging-24.2-py3-none-any.whl", hash = 
"sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},
     {file = "packaging-24.2.tar.gz", hash = 
"sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},
@@ -2775,4 +2775,4 @@ propcache = ">=0.2.0"
 [metadata]
 lock-version = "2.1"
 python-versions = "~=3.13"
-content-hash = 
"3e325f6a2ed6431810f190b2f9b609f6b662de3efa4b2aeb99cbdd32052f8544"
+content-hash = 
"d36d2d586ed32d0c1a2e1a13639c4e089fb5cead77d7c6a4cb41448e0435993b"
diff --git a/pyproject.toml b/pyproject.toml
index 0b1431b..5036ac7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,7 +20,6 @@ dependencies = [
   # "dkimpy>=1.1.8,<2.0.0",  # Using GitHub fork instead
   "dkimpy @ git+https://github.com/sbp/dkimpy.git@main";,
   "dnspython>=2.7.0,<3.0.0",
-  "dunamai>=1.23.0",
   "greenlet>=3.1.1,<4.0.0",
   "httpx~=0.27",
   "hypercorn~=0.17",
@@ -35,6 +34,7 @@ dependencies = [
 [dependency-groups]
 dev = [
   "djlint>=1.36.4",
+  "dunamai>=1.23.0",
   "mypy>=1.15.0",
   "pre-commit>=2.20.0",
   "pyright>=1.1.393",
@@ -67,6 +67,7 @@ pytest-asyncio = ">=0.24"
 
 [tool.poetry.group.dev.dependencies]
 djlint = "^1.36.4"
+dunamai = "^1.23.0"
 mypy = "^1.15.0"
 pre-commit = ">=2.20.0"
 pyright = ">=1.1.393"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to