reset cfg.VERSION after running the setrev command

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-04-11 17:19:02 +00:00
parent df9729b1ac
commit 2e5b10c207
3 changed files with 30 additions and 23 deletions

View File

@@ -1458,7 +1458,7 @@ def cmd_bdist(options, args):
if os.path.exists(tarfilename):
os.remove(tarfilename)
msg("Archiving Phoenix binaries...")
msg("Archiving Phoenix binaries to %s..." % tarfilename)
tarball = tarfile.open(name=tarfilename, mode="w:gz")
tarball.add('wx', opj(rootname, 'wx'),
filter=lambda info: None if '.svn' in info.name \
@@ -1494,6 +1494,8 @@ def cmd_setrev(options, args):
f = open('REV.txt', 'w')
f.write(svnrev)
f.close()
cfg = Config()
cfg.resetVersion()
msg('REV.txt set to "%s"' % svnrev)

View File

@@ -163,9 +163,9 @@ def makeFactory(port, buildType='buildOnly', pyVer='2.7'):
if buildType == 'docs':
cmd = 'python -u build.py setrev %s dox touch etg sip build wxlib sphinx docs_bdist sdist --upload_package' % pyVer
cmd = 'python -u build.py %s setrev dox touch etg sip build wxlib sphinx docs_bdist sdist --upload_package' % pyVer
else:
cmd = 'python -u build.py setrev %s %s dox touch etg --nodoc sip build' % (pyVer, clean)
cmd = 'python -u build.py %s %s setrev dox touch etg --nodoc sip build' % (pyVer, clean)
if port == 'osx':
if buildType == 'buildOnly':
# Only build one arch for the normal builds, so dependency

View File

@@ -91,27 +91,9 @@ class Configuration(object):
def __init__(self, noWxConfig=False):
self.CLEANUP = list()
# load the version numbers into this instance's namespace
versionfile = opj(os.path.split(__file__)[0], 'version.py')
myExecfile(versionfile, self.__dict__)
# Include the subversion revision in the version number? REV.txt can
# be created using the build.py setrev command. If it doesn't exist
# then the version number is built without a revision number. IOW, it
# is a release build. (In theory)
if os.path.exists('REV.txt'):
f = open('REV.txt')
self.VER_FLAGS = '-' + f.read().strip()
f.close()
self.VERSION = "%s.%s.%s.%s%s" % (self.VER_MAJOR,
self.VER_MINOR,
self.VER_RELEASE,
self.VER_SUBREL,
self.VER_FLAGS)
self.WXDLLVER = '%d%d' % (self.VER_MAJOR, self.VER_MINOR)
self.resetVersion()
# change the PORT default for wxMac
if sys.platform[:6] == "darwin":
self.WXPORT = 'osx_cocoa'
@@ -342,6 +324,29 @@ class Configuration(object):
# ---------------------------------------------------------------
# Helper functions
def resetVersion(self):
# load the version numbers into this instance's namespace
versionfile = opj(os.path.split(__file__)[0], 'version.py')
myExecfile(versionfile, self.__dict__)
# Include the subversion revision in the version number? REV.txt can
# be created using the build.py setrev command. If it doesn't exist
# then the version number is built without a revision number. IOW, it
# is a release build. (In theory)
if os.path.exists('REV.txt'):
f = open('REV.txt')
self.VER_FLAGS = '-' + f.read().strip()
f.close()
self.VERSION = "%s.%s.%s.%s%s" % (self.VER_MAJOR,
self.VER_MINOR,
self.VER_RELEASE,
self.VER_SUBREL,
self.VER_FLAGS)
self.WXDLLVER = '%d%d' % (self.VER_MAJOR, self.VER_MINOR)
def parseCmdLine(self):
self.debug = '--debug' in sys.argv or '-g' in sys.argv