Staging
v0.5.1
https://github.com/python/cpython
Revision 62a14db9f4f7b77bfc5663902f0d05f74901e950 authored by R. David Murray on 26 June 2010, 18:39:50 UTC, committed by R. David Murray on 26 June 2010, 18:39:50 UTC
In 2.5 the email version was bumped to 4.0.2 just before release but
after the maintenance branch was set up.  The bump was not backported
to trunk, and 2.6 went out the door with a version number of 4.0.1.
I bumped this to 4.0.2 because of a behavior change, but that makes
it look the same as 2.5.  So bump it again to 4.0.3.
1 parent 04a3439
Raw File
Tip revision: 62a14db9f4f7b77bfc5663902f0d05f74901e950 authored by R. David Murray on 26 June 2010, 18:39:50 UTC
#9085: email versions have gotten out of sync, 2.7 is actually 4.0.3.
Tip revision: 62a14db
vs9to8.py
from __future__ import with_statement
import os

def vs9to8(src, dest):
    for name in os.listdir(src):
        path, ext = os.path.splitext(name)
        if ext.lower() not in ('.sln', '.vcproj', '.vsprops'):
            continue

        filename = os.path.normpath(os.path.join(src, name))
        destname = os.path.normpath(os.path.join(dest, name))
        print("%s -> %s" % (filename, destname))

        with open(filename, 'rU') as fin:
            lines = fin.read()
            lines = lines.replace('Version="9,00"', 'Version="8.00"')
            lines = lines.replace('Version="9.00"', 'Version="8.00"')
            lines = lines.replace('Format Version 10.00', 'Format Version 9.00')
            lines = lines.replace('Visual Studio 2008', 'Visual Studio 2005')

            lines = lines.replace('wininst-9.0', 'wininst-8.0')
            lines = lines.replace('..\\', '..\\..\\')
            lines = lines.replace('..\\..\\..\\..\\', '..\\..\\..\\')

            # Bah. VS8.0 does not expand macros in file names.
            # Replace them here.
            lines = lines.replace('$(sqlite3Dir)', '..\\..\\..\\sqlite-3.6.21')
            lines = lines.replace('$(bsddbDir)\\..\\..', '..\\..\\..\\db-4.7.25.0\\build_windows\\..')
            lines = lines.replace('$(bsddbDir)', '..\\..\\..\\db-4.7.25.0\\build_windows')

        with open(destname, 'wb') as fout:
            lines = lines.replace("\n", "\r\n")
            fout.write(lines)

if __name__ == "__main__":
    vs9to8(src=".", dest="../PC/VS8.0")
back to top