mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 10:46:24 +00:00
setup.py: use constant for _version.py filename.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
8e0ec757e7
commit
b43447003e
9
setup.py
9
setup.py
@ -37,7 +37,8 @@ def read_version_py(infname):
|
||||
if mo:
|
||||
return mo.group(1)
|
||||
|
||||
version = read_version_py("src/allmydata/_version.py")
|
||||
VERSION_PY_FILENAME = 'src/allmydata/_version.py'
|
||||
version = read_version_py(VERSION_PY_FILENAME)
|
||||
|
||||
APPNAME='allmydata-tahoe'
|
||||
APPNAMEFILE = os.path.join('src', 'allmydata', '_appname.py')
|
||||
@ -361,8 +362,7 @@ class UpdateVersion(Command):
|
||||
def try_from_git(self):
|
||||
versions = versions_from_git("allmydata-tahoe-")
|
||||
if versions:
|
||||
fn = 'src/allmydata/_version.py'
|
||||
f = open(fn, "wb")
|
||||
f = open(VERSION_PY_FILENAME, "wb")
|
||||
f.write(GIT_VERSION_BODY %
|
||||
{ "pkgname": self.distribution.get_name(),
|
||||
"version": versions["version"],
|
||||
@ -371,7 +371,8 @@ class UpdateVersion(Command):
|
||||
"branch": versions["branch"],
|
||||
})
|
||||
f.close()
|
||||
print("git-version: wrote '%s' into '%s'" % (versions["version"], fn))
|
||||
print("git-version: wrote '%s' into '%s'" % (versions["version"], VERSION_PY_FILENAME))
|
||||
|
||||
return versions.get("normalized", None)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user