allmydata.__version__ can just be a string, it doesn't need to be an instance
of some fancy NormalizedVersion class. Everything inside Tahoe uses
str(__version__) anyways.
Also add .dev0 when a git tree is dirty.
Closes #1466
+DARCS_VERSION_BODY = '''
+# This _version.py is generated from darcs metadata by the tahoe setup.py
+# and the "darcsver" package.
+
+__pkgname__ = "%(pkgname)s"
+verstr = "%(pkgversion)s"
+__version__ = verstr
+'''
+
GIT_VERSION_BODY = '''
# This _version.py is generated from git metadata by the tahoe setup.py.
GIT_VERSION_BODY = '''
# This _version.py is generated from git metadata by the tahoe setup.py.
real_version = "%(version)s"
full_version = "%(full)s"
verstr = "%(normalized)s"
real_version = "%(version)s"
full_version = "%(full)s"
verstr = "%(normalized)s"
-try:
- from pyutil.version_class import Version as pyutil_Version
- __version__ = pyutil_Version(verstr)
-except (ImportError, ValueError):
- # Maybe there is no pyutil installed.
- from distutils.version import LooseVersion as distutils_Version
- __version__ = distutils_Version(verstr)
'''
def run_command(args, cwd=None, verbose=False):
'''
def run_command(args, cwd=None, verbose=False):
full = stdout.strip()
if version.endswith("-dirty"):
full += "-dirty"
full = stdout.strip()
if version.endswith("-dirty"):
full += "-dirty"
+ normalized_version += ".dev0"
return {"version": version, "normalized": normalized_version, "full": full}
return {"version": version, "normalized": normalized_version, "full": full}
from darcsver.darcsvermodule import update
(rc, verstr) = update(pkgname=self.distribution.get_name(),
verfilename=self.distribution.versionfiles,
from darcsver.darcsvermodule import update
(rc, verstr) = update(pkgname=self.distribution.get_name(),
verfilename=self.distribution.versionfiles,
+ revision_number=True,
+ version_body=DARCS_VERSION_BODY)
if rc == 0:
return verstr
if rc == 0:
return verstr