Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision 31e8af9ea5f1d9d696c8efea40fc774a37dfc776 authored by Martin v. Löwis on 18 February 2010, 16:29:17 UTC, committed by Martin v. Löwis on 18 February 2010, 16:29:17 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78225 | martin.v.loewis | 2010-02-18 17:27:43 +0100 (Do, 18 Feb 2010) | 11 lines Merged revisions 78213 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78213 | martin.v.loewis | 2010-02-18 10:22:20 +0100 (Do, 18 Feb 2010) | 3 lines Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as msvcr100.dll is not a platform assembly anymore. ........ ................
1 parent 9b3bada
Tip revision: 31e8af9ea5f1d9d696c8efea40fc774a37dfc776 authored by Martin v. Löwis on 18 February 2010, 16:29:17 UTC
Merged revisions 78225 via svnmerge from
Merged revisions 78225 via svnmerge from
Tip revision: 31e8af9
field3.py
# An absurd workaround for the lack of arithmetic in MS's resource compiler.
# After building Python, run this, then paste the output into the appropriate
# part of PC\python_nt.rc.
# Example output:
#
# * For 2.3a0,
# * PY_MICRO_VERSION = 0
# * PY_RELEASE_LEVEL = 'alpha' = 0xA
# * PY_RELEASE_SERIAL = 1
# *
# * and 0*1000 + 10*10 + 1 = 101.
# */
# #define FIELD3 101
import sys
major, minor, micro, level, serial = sys.version_info
levelnum = {'alpha': 0xA,
'beta': 0xB,
'candidate': 0xC,
'final': 0xF,
}[level]
string = sys.version.split()[0] # like '2.3a0'
print(" * For %s," % string)
print(" * PY_MICRO_VERSION = %d" % micro)
print(" * PY_RELEASE_LEVEL = %r = %s" % (level, hex(levelnum)))
print(" * PY_RELEASE_SERIAL = %d" % serial)
print(" *")
field3 = micro * 1000 + levelnum * 10 + serial
print(" * and %d*1000 + %d*10 + %d = %d" % (micro, levelnum, serial, field3))
print(" */")
print("#define FIELD3", field3)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...