summaryrefslogtreecommitdiffstats
path: root/third_party/tlslite/make_release.py
diff options
context:
space:
mode:
authorinitial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-27 00:38:33 +0000
committerinitial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-27 00:38:33 +0000
commit584cd5cbd7be997400ccb8db24ae5410b0b88117 (patch)
tree083e5f1f48d019e0f07b96fef7179483df53c823 /third_party/tlslite/make_release.py
parentf5b16fed647e941aa66933178da85db2860d639b (diff)
downloadchromium_src-584cd5cbd7be997400ccb8db24ae5410b0b88117.zip
chromium_src-584cd5cbd7be997400ccb8db24ae5410b0b88117.tar.gz
chromium_src-584cd5cbd7be997400ccb8db24ae5410b0b88117.tar.bz2
Add third_party to the repository.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tlslite/make_release.py')
-rw-r--r--third_party/tlslite/make_release.py61
1 files changed, 61 insertions, 0 deletions
diff --git a/third_party/tlslite/make_release.py b/third_party/tlslite/make_release.py
new file mode 100644
index 0000000..d289879
--- /dev/null
+++ b/third_party/tlslite/make_release.py
@@ -0,0 +1,61 @@
+
+#When run on (my) windows box, this builds and cleans everything in
+#preparation for a release.
+
+import os
+import sys
+
+#Replace version strings
+if len(sys.argv)>1:
+ oldVersion = sys.argv[1]
+ newVersion = sys.argv[2]
+ query = raw_input("Replace %s with %s?: " % (oldVersion, newVersion))
+ if query == "y":
+ #First, scan through and make sure the replacement is possible
+ for filename in ("setup.py", "tlslite\\__init__.py", "scripts\\tls.py", "scripts\\tlsdb.py"):
+ s = open(filename, "rU").read()
+ x = s.count(oldVersion)
+ if filename.endswith("__init__.py"):
+ if x != 2:
+ print "Error, old version appears in %s %s times" % (filename, x)
+ sys.exit()
+ else:
+ if x != 1:
+ print "Error, old version appears in %s %s times" % (filename, x)
+ sys.exit()
+
+ #Then perform it
+ for filename in ("setup.py", "tlslite\\__init__.py", "scripts\\tls.py", "scripts\\tlsdb.py"):
+ os.system("copy %s .." % filename) #save a backup copy in case something goes awry
+ s = open(filename, "r").read()
+ f = open(filename, "w")
+ f.write(s.replace(oldVersion, newVersion))
+ f.close()
+
+
+#Make windows installers
+os.system("del installers\*.exe")
+
+#Python 2.3
+os.system("rmdir build /s /q")
+os.system("python23 setup.py bdist_wininst -o")
+os.system("copy dist\* installers")
+
+#Python 2.4
+os.system("rmdir build /s /q")
+os.system("python24 setup.py bdist_wininst -o")
+os.system("copy dist\* installers")
+
+
+#Make documentation
+os.system("python23 c:\\devtools\\python23\\scripts\\epydoc.py --html -o docs tlslite")
+
+#Delete excess files
+os.system("del tlslite\\*.pyc")
+os.system("del tlslite\\utils\\*.pyc")
+os.system("del tlslite\\integration\\*.pyc")
+os.system("rmdir build /s /q")
+os.system("rmdir dist /s /q")
+
+
+