8000 improve meta-version management · drinkingjava/python-versioneer@5475ced · GitHub
[go: up one dir, main page]

Skip to content

Commit 5475ced

Browse files
committed
improve meta-version management
1 parent 30bb344 commit 5475ced

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
version-control system about the current tree.
1111
"""
1212

13+
# as nice as it'd be to versioneer ourselves, that sounds messy.
14+
VERSION = "0.8+"
15+
1316
def get(fn):
1417
return open(fn, "r").read()
1518
def unquote(s):
1619
return s.replace("%", "%%")
1720
def ver(s):
18-
return s.replace("@VERSIONEER@", "0.8+")
21+
return s.replace("@VERSIONEER-VERSION@", VERSION)
1922
def readme(s):
2023
return s.replace("@README@", get("README.md"))
2124

@@ -70,7 +73,7 @@ def run(self):
7073

7174
with open("src/installer.py") as f:
7275
s = f.read()
73-
s = s.replace("@VERSIONEER-INSTALLER@", v_b64)
76+
s = ver(s.replace("@VERSIONEER-INSTALLER@", v_b64))
7477

7578
tempdir = tempfile.mkdtemp()
7679
installer = os.path.join(tempdir, "versioneer-installer")
@@ -86,7 +89,7 @@ def run(self):
8689
setup(
8790
name = "versioneer",
8891
license = "public domain",
89-
version = "0.8+",
92+
version = VERSION,
9093
description = "Easy VCS-based management of project version strings",
9194
author = "Brian Warner",
9295
author_email = "warner-versioneer@lothar.com",

src/git/long-version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# that just contains the computed version number.
77

88
# This file is released into the public domain. Generated by
9-
# versioneer-@VERSIONEER@ (https://github.com/warner/python-versioneer)
9+
# versioneer-@VERSIONEER-VERSION@ (https://github.com/warner/python-versioneer)
1010

1111
# these strings will be replaced by git during git-archive
1212
git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s"

src/header.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Version: @VERSIONEER@
2+
# Version: @VERSIONEER-VERSION@
33

44
"""
55
@README@

src/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
print "overwriting existing versioneer.py"
1212
with open("versioneer.py", "w") as f:
1313
f.write(v)
14-
print "versioneer.py installed into local tree"
14+
print "versioneer.py (@VERSIONEER-VERSION@) installed into local tree"
1515
print "Now please follow instructions in the docstring."

src/trailer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
SHORT_VERSION_PY = """
3-
# This file was generated by 'versioneer.py' (@VERSIONEER@) from
3+
# This file was generated by 'versioneer.py' (@VERSIONEER-VERSION@) from
44
# revision-control system data, or from the parent directory name of an
55
# unpacked source archive. Distribution tarballs contain a pre-generated copy
66
# of this file.

0 commit comments

Comments
 (0)
0