mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 06:42:26 +00:00
3cb08209d2
this resolves problems of py2exe's modulefinder collection of sources from .zipped egg files, not by using easy_install to reach the --always-unzip option, but rather with a small tool which unpacks any zipped egg files found in misc/dependencies. this fixes the py2exe build given rollback of the easy_install stuff which had broken the unix builds. misc/hatch-eggs.py performs the honours. this also includes a misc/sub-ver.py tool which substitutes elements of the verion number for the current code base (by importing allmydata.__version__ hence make-version should be run first, and the python path carefully managed) into template files using python's string interpolation of named args from a dict as the templating syntax. i.e. %(major)d %(minor)d %(point)d %(nano)d each expand to the individual components of the version number as codified by the pyutil.version_class.Version class. there is also a %(build)s tag which expands to the string form of the whole version number. This tool is used to interpolate the automatically generated version information into the innosetup source file in a form consistent with innosetup/windows' restrictions
27 lines
479 B
Python
27 lines
479 B
Python
#! /usr/bin/python
|
|
|
|
from allmydata import __version__ as v
|
|
|
|
import sys
|
|
|
|
if len(sys.argv) == 1:
|
|
input = sys.stdin
|
|
elif len(sys.argv) == 2:
|
|
fname = sys.argv[1]
|
|
input = file(fname, 'rb')
|
|
else:
|
|
raise ValueError('must provide 0 or 1 argument (stdin, or filename)')
|
|
|
|
vern = {
|
|
'major': v.major,
|
|
'minor': v.minor,
|
|
'point': v.micro,
|
|
'micro': v.micro,
|
|
'nano' : v.nano,
|
|
'build': str(v),
|
|
}
|
|
|
|
for line in input.readlines():
|
|
print line % vern,
|
|
|