[pypy-commit] pypy default: Clean up.
arigo
noreply at buildbot.pypy.org
Mon Aug 11 15:41:35 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r72752:9eb10c16e25a
Date: 2014-08-11 15:41 +0200
http://bitbucket.org/pypy/pypy/changeset/9eb10c16e25a/
Log: Clean up.
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -52,13 +52,18 @@
sep_template = "\nThis copy of PyPy includes a copy of %s, which is licensed under the following terms:\n\n"
-def generate_license_linux(basedir, options):
+def generate_license(basedir, options):
base_file = str(basedir.join('LICENSE'))
with open(base_file) as fid:
txt = fid.read()
- searches = [("bzip2","libbz2-*", "copyright", '---------'),
- ("openssl", "openssl*", "copyright", 'LICENSE ISSUES'),
- ]
+ if sys.platform == 'win32':
+ # shutil.copyfileobj(open("crtlicense.txt"), out) # We do not ship
+ # msvc runtime files, but otherwise we'd need this on Windows
+ searches = [("bzip2","bzip2-*", "LICENSE", ''),
+ ("openssl", "openssl-*", "LICENSE", '')]
+ else:
+ searches = [("bzip2","libbz2-*dev", "copyright", '---------'),
+ ("openssl", "openssl*", "copyright", 'LICENSE ISSUES')]
if not options.no_tk:
name = 'Tcl/Tk'
txt += "License for '%s'" %name
@@ -73,9 +78,9 @@
txt += sep_template % name
dirs = glob.glob(options.license_base + "/" +pat)
if not dirs:
- raise ValueError, "Could not find "+ options.license_base + "/" + pat
+ raise ValueError, "Could not find %s/%s" % (options.license_base, pat)
if len(dirs) > 1:
- raise ValueError, "Multiple copies of "+pat
+ raise ValueError, "Multiple copies of %r: %r" % (pat, dirs)
dir = dirs[0]
with open(os.path.join(dir, fname)) as fid:
# Read up to the line dividing the packaging header from the actual copyright
@@ -92,43 +97,6 @@
txt += gdbm_bit
return txt
-def generate_license_windows(basedir, options):
- base_file = str(basedir.join('LICENSE'))
- with open(base_file) as fid:
- txt = fid.read()
- # shutil.copyfileobj(open("crtlicense.txt"), out) # We do not ship msvc runtime files
- if not options.no_tk:
- name = 'Tcl/Tk'
- txt += "License for '%s'" %name
- txt += '\n' + "="*(14 + len(name)) + '\n'
- txt += sep_template % name
- base_file = str(basedir.join('lib_pypy/_tkinter/license.terms'))
- with open(base_file, 'r') as fid:
- txt += fid.read()
- for name, pat, file in (("bzip2","bzip2-*", "LICENSE"),
- ("openssl", "openssl-*", "LICENSE")):
- txt += sep_template % name
- dirs = glob.glob(options.license_base + "/" +pat)
- if not dirs:
- raise ValueError, "Could not find "+ options.license_base + "/" + pat
- if len(dirs) > 2:
- raise ValueError, "Multiple copies of "+pat
- dir = dirs[0]
- with open(os.path.join(dir, file)) as fid:
- txt += fid.read()
- return txt
-
-def generate_license_darwin(basedir, options):
- # where are copyright files on macos?
- return generate_license_linux(basedir, options)
-
-if sys.platform == 'win32':
- generate_license = generate_license_windows
-elif sys.platform == 'darwin':
- generate_license = generate_license_darwin
-else:
- generate_license = generate_license_linux
-
def create_cffi_import_libraries(pypy_c, options):
modules = ['_sqlite3']
subprocess.check_call([str(pypy_c), '-c', 'import _sqlite3'])
@@ -396,7 +364,9 @@
----
The gdbm module includes code from gdbm.h, which is distributed under the terms
-of the GPL license version 2 or any later version.
+of the GPL license version 2 or any later version. Thus the gdbm module, provided in
+the file lib_pypy/gdbm.py, is redistributed under the terms of the GPL license as
+well.
'''
More information about the pypy-commit
mailing list