mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files.
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			974 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			974 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# 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)
 |