mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
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:
4
build.py
4
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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user