Made the version number information more robust and uh, informative.
Also added asserts to check that the major.minor versions of wxPython and wxWindows match. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,7 +13,12 @@ from distutils.command.install_data import install_data
|
||||
# flags and values that affect this script
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
VERSION = "2.4.0.8p1"
|
||||
VER_MAJOR = 2 # The first three must match wxWindows
|
||||
VER_MINOR = 4
|
||||
VER_RELEASE = 0
|
||||
VER_SUBREL = 8 # wxPython release num for x.y.z release of wxWindows
|
||||
VER_FLAGS = "p1" # release flags, such as prerelease num, unicode, etc.
|
||||
|
||||
DESCRIPTION = "Cross platform GUI toolkit for Python"
|
||||
AUTHOR = "Robin Dunn"
|
||||
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
|
||||
@@ -201,7 +206,7 @@ def Verify_WX_CONFIG():
|
||||
uf = 'u'
|
||||
else:
|
||||
uf = ''
|
||||
ver2 = VERSION[:3]
|
||||
ver2 = "%s.%s" % (VER_MAJOR, VER_MINOR)
|
||||
WX_CONFIG = 'wx%s%s%s-%s-config' % (WXPORT, uf, df, ver2)
|
||||
|
||||
searchpath = os.environ["PATH"]
|
||||
@@ -483,22 +488,38 @@ else:
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# post platform setup checks and tweaks
|
||||
# post platform setup checks and tweaks, create the full version string
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if UNICODE:
|
||||
BUILD_BASE = BUILD_BASE + '.unicode'
|
||||
VERSION = VERSION + 'u'
|
||||
VER_FLAGS += 'u'
|
||||
|
||||
|
||||
VERSION = "%s.%s.%s.%s%s" % (VER_MAJOR, VER_MINOR, VER_RELEASE,
|
||||
VER_SUBREL, VER_FLAGS)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Check if the version file needs updated
|
||||
# Update the version file
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
##if IN_CVS_TREE and newer('setup.py', 'src/__version__.py'):
|
||||
# Unconditionally updated since the version string can change based
|
||||
# on the UNICODE flag
|
||||
open('src/__version__.py', 'w').write("""\
|
||||
# This file was generated by setup.py...
|
||||
|
||||
wxVERSION_STRING = '%(VERSION)s'
|
||||
wxMAJOR_VERSION = %(VER_MAJOR)s
|
||||
wxMINOR_VERSION = %(VER_MINOR)s
|
||||
wxRELEASE_VERSION = %(VER_RELEASE)s
|
||||
wxSUBREL_VERSION = %(VER_SUBREL)s
|
||||
|
||||
wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_VERSION,
|
||||
wxSUBREL_VERSION, '%(VER_FLAGS)s')
|
||||
|
||||
wxRELEASE_NUMBER = wxRELEASE_VERSION # for compatibility
|
||||
""" % globals())
|
||||
|
||||
# Always do it since the version string can change based on the UNICODE flag
|
||||
open('src/__version__.py', 'w').write("ver = '%s'\n" % VERSION)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user