[Python-checkins] r63626 - python/branches/release25-maint/Tools/msi/msi.py
martin.v.loewis
python-checkins at python.org
Sun May 25 14:02:30 CEST 2008
Author: martin.v.loewis
Date: Sun May 25 14:02:29 2008
New Revision: 63626
Log:
Include all licenses of the packages that we include.
Modified:
python/branches/release25-maint/Tools/msi/msi.py
Modified: python/branches/release25-maint/Tools/msi/msi.py
==============================================================================
--- python/branches/release25-maint/Tools/msi/msi.py (original)
+++ python/branches/release25-maint/Tools/msi/msi.py Sun May 25 14:02:29 2008
@@ -853,6 +853,26 @@
return installer.FileVersion("msvcr71.dll", 0), \
installer.FileVersion("msvcr71.dll", 1)
+def generate_license():
+ import shutil, glob
+ out = open("LICENSE.txt", "w")
+ shutil.copyfileobj(open(os.path.join(srcdir, "LICENSE")), out)
+ for dir, file in (("bzip2","LICENSE"),
+ ("db", "LICENSE"),
+ ("openssl", "LICENSE"),
+ ("tcl", "license.terms"),
+ ("tk", "license.terms")):
+ out.write("\nThis copy of Python includes a copy of %s, which is licensed under the following terms:\n\n" % dir)
+ dirs = glob.glob(srcdir+"/../"+dir+"-*")
+ if not dirs:
+ raise ValueError, "Could not find "+srcdir+"/../"+dir+"-*"
+ if len(dirs) > 2:
+ raise ValueError, "Multiple copies of "+dir
+ dir = dirs[0]
+ shutil.copyfileobj(open(os.path.join(dir, file)), out)
+ out.close()
+
+
class PyDirectory(Directory):
"""By default, all components in the Python installer
can run from source."""
@@ -873,7 +893,8 @@
root.add_file("PCBuild/w9xpopen.exe")
root.add_file("README.txt", src="README")
root.add_file("NEWS.txt", src="Misc/NEWS")
- root.add_file("LICENSE.txt", src="LICENSE")
+ generate_license()
+ root.add_file("LICENSE.txt", src=os.path.abspath("LICENSE.txt"))
root.start_component("python.exe", keyfile="python.exe")
root.add_file("PCBuild/python.exe")
root.start_component("pythonw.exe", keyfile="pythonw.exe")
More information about the Python-checkins
mailing list