diff --git a/build.py b/build.py index 2d57410f..7aff9426 100755 --- a/build.py +++ b/build.py @@ -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) diff --git a/buildbot/master.cfg b/buildbot/master.cfg index fffb19ff..47eae221 100644 --- a/buildbot/master.cfg +++ b/buildbot/master.cfg @@ -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 diff --git a/buildtools/config.py b/buildtools/config.py index 99589935..da01b026 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -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