##// END OF EJS Templates
Fixing a few bugs to get the win32 installer working again.
Fixing a few bugs to get the win32 installer working again.

File last commit:

r2060:9544ab83
r2060:9544ab83
Show More
update_revnum.py
23 lines | 579 B | text/x-python | PythonLexer
#!/usr/bin/env python
""" Change the revision number in Release.py """
import os
import re,pprint
def verinfo():
out = os.popen('bzr version-info')
pairs = (l.split(':',1) for l in out)
d = dict(((k,v.strip()) for (k,v) in pairs))
return d
ver = verinfo()
pprint.pprint(ver)
rfile = open('../IPython/core/release.py','rb').read()
newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % ver['revno'], rfile)
newcont = re.sub(r'^branch\s*=[^=].*', "branch = '%s'" % ver['branch-nick'], newcont )
open('../IPython/core/release.py','wb').write(newcont)