setuptools-git-versioning 3.2.0__py3-none-any.whl → 3.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- setuptools_git_versioning/archival.py +7 -11
- {setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/METADATA +2 -1
- {setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/RECORD +7 -7
- {setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/WHEEL +1 -1
- {setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/entry_points.txt +0 -0
- {setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/licenses/LICENSE +0 -0
- {setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/top_level.txt +0 -0
|
@@ -25,8 +25,8 @@ if TYPE_CHECKING:
|
|
|
25
25
|
ARCHIVAL_FILENAME = ".git_archival.txt"
|
|
26
26
|
DESCRIBE_UNSUPPORTED = "%(describe"
|
|
27
27
|
FORMAT_UNSUBSTITUTED = "$Format"
|
|
28
|
-
DESCRIBE_PARTS = 3 # tag-N-gSHA
|
|
29
28
|
|
|
29
|
+
DESCRIBE_RE = re.compile(r"^(?P<tag>.+)-(?P<ccount>[0-9]+)-g(?P<sha>[0-9a-f]+)$") # tag-N-gSHA
|
|
30
30
|
REF_TAG_RE = re.compile(r"(?<=\btag: )([^,]+)\b")
|
|
31
31
|
REF_HEAD_RE = re.compile(r"HEAD\s*->\s*([^,]+)")
|
|
32
32
|
FULL_SHA_RE = re.compile(r"^([0-9a-f]{40}|[0-9a-f]{64})$") # SHA-1 or SHA-256
|
|
@@ -74,18 +74,14 @@ def _parse_describe(describe: str) -> tuple[str, int, str | None, bool]:
|
|
|
74
74
|
dirty = True
|
|
75
75
|
describe = describe[: -len("-dirty")]
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
# On a tagged commit, `git describe` prints the bare tag. Only split off
|
|
78
|
+
# the suffix when it really is `-N-gSHA`, so that tags like `2024-01-15`
|
|
79
|
+
# are not mistaken for a tag followed by a commit count and a SHA.
|
|
80
|
+
match = DESCRIBE_RE.match(describe)
|
|
81
|
+
if not match:
|
|
79
82
|
return describe, 0, None, dirty
|
|
80
83
|
|
|
81
|
-
tag,
|
|
82
|
-
try:
|
|
83
|
-
ccount = int(ccount_str)
|
|
84
|
-
except ValueError:
|
|
85
|
-
return describe, 0, None, dirty
|
|
86
|
-
|
|
87
|
-
short_sha = gnode[1:] if gnode.startswith("g") else gnode
|
|
88
|
-
return tag, ccount, short_sha, dirty
|
|
84
|
+
return match.group("tag"), int(match.group("ccount")), match.group("sha"), dirty
|
|
89
85
|
|
|
90
86
|
|
|
91
87
|
def _branch_from_ref_names(ref_names: str) -> str | None:
|
{setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: setuptools-git-versioning
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: Use git repo data for building a version number according to PEP-440
|
|
5
5
|
Author-email: dolfinus <martinov.m.s.8@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
24
25
|
Classifier: Operating System :: OS Independent
|
|
25
26
|
Requires-Python: >=3.7
|
|
26
27
|
Description-Content-Type: text/x-rst
|
{setuptools_git_versioning-3.2.0.dist-info → setuptools_git_versioning-3.2.1.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
setuptools_git_versioning/__init__.py,sha256=HBPrkDXm4rugE32DxfzvPZwFkZodvB9d1Pt4m9MwmNw,1003
|
|
2
2
|
setuptools_git_versioning/__main__.py,sha256=6mSX6LsqmyKDEmobvZRfrxXO0kDuZH3aENzvxbunOtA,55
|
|
3
|
-
setuptools_git_versioning/archival.py,sha256=
|
|
3
|
+
setuptools_git_versioning/archival.py,sha256=9bjUs7H64e0y_heO2ldiHKfVRHRGcuuhakRULxsxZMY,7639
|
|
4
4
|
setuptools_git_versioning/cli.py,sha256=DQ6_OFbKXUM30dnP0wWWJbAVjt5RIjxFxUw3sfdBtFs,1132
|
|
5
5
|
setuptools_git_versioning/defaults.py,sha256=b6v4LbK8Js_WQmsqzSouP2eTgc1TAttkM6sD1i1gFCI,822
|
|
6
6
|
setuptools_git_versioning/dynamic_metadata.py,sha256=IUNeuWpKmmjVDvB7yNY_8bTdCDaIw2DZM_Maty4twXM,1618
|
|
@@ -11,9 +11,9 @@ setuptools_git_versioning/scikit_metadata.py,sha256=9XeDmR163oBoEM8NtHpHNYmhT5Ei
|
|
|
11
11
|
setuptools_git_versioning/setup.py,sha256=bQGeT96GFodgmemaOo19uuwyRiNIySleGDB1T46FQOY,5357
|
|
12
12
|
setuptools_git_versioning/subst.py,sha256=thLbkXUmUvsZR84o1S7D5uXsYmK4xSldGGPBGQdwccM,2174
|
|
13
13
|
setuptools_git_versioning/version.py,sha256=ZQtW-QolkWhc066V4wSwQ0tOhSRFb53xamzjs7uZMwg,9459
|
|
14
|
-
setuptools_git_versioning-3.2.
|
|
15
|
-
setuptools_git_versioning-3.2.
|
|
16
|
-
setuptools_git_versioning-3.2.
|
|
17
|
-
setuptools_git_versioning-3.2.
|
|
18
|
-
setuptools_git_versioning-3.2.
|
|
19
|
-
setuptools_git_versioning-3.2.
|
|
14
|
+
setuptools_git_versioning-3.2.1.dist-info/licenses/LICENSE,sha256=YP7W0rZutEgY8ypJZeFLuZDSYsaZC-P6YxGZDjiFuL4,1060
|
|
15
|
+
setuptools_git_versioning-3.2.1.dist-info/METADATA,sha256=Bp_jmVj6ygT8TIBuoXpqQ3u8hes4oyD3wTvCmwocN0k,7117
|
|
16
|
+
setuptools_git_versioning-3.2.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
17
|
+
setuptools_git_versioning-3.2.1.dist-info/entry_points.txt,sha256=e-Eyt_a42w9hc-6tjRpitRnP4TxvlLwelNPI5k-jdEA,405
|
|
18
|
+
setuptools_git_versioning-3.2.1.dist-info/top_level.txt,sha256=aP9te4bjCBVXzZRQhwrT_IdcSxOe1Dd8Mb_oFCeNyEI,26
|
|
19
|
+
setuptools_git_versioning-3.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|