diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-05-25 11:56:23 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-05-25 11:56:23 (GMT) |
commit | dcc86204eb844b3f2cf36c898ba0c1ad4def02b1 (patch) | |
tree | 81c581f2b4482916eb9ca02e4b631e012086c03b /Tools/msi | |
parent | 5d7d6c37c275b03c2e6f4692f77d6306089e1398 (diff) | |
download | cpython-dcc86204eb844b3f2cf36c898ba0c1ad4def02b1.zip cpython-dcc86204eb844b3f2cf36c898ba0c1ad4def02b1.tar.gz cpython-dcc86204eb844b3f2cf36c898ba0c1ad4def02b1.tar.bz2 |
Include all licenses of the packages that we include.
Diffstat (limited to 'Tools/msi')
-rw-r--r-- | Tools/msi/msi.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py index 74f6c37..032d662 100644 --- a/Tools/msi/msi.py +++ b/Tools/msi/msi.py @@ -840,6 +840,26 @@ def extract_msvcr90(): result.append((f, kw)) return result +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.""" @@ -860,7 +880,8 @@ def add_files(db): root.add_file("%s/w9xpopen.exe" % PCBUILD) 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("%s/python.exe" % PCBUILD) root.start_component("pythonw.exe", keyfile="pythonw.exe") |