58c938cba7
- Update to version 2.7.5: + Issue #15535: Fixed regression in the pickling of named tuples by removing the __dict__ property introduced in 2.7.4. + Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, such as was shipped with Centos 5 and Mac OS X 10.4. + Issue #17703: Fix a regression where an illegal use of Py_DECREF() after interpreter finalization can cause a crash. + Issue #16447: Fixed potential segmentation fault when setting __name__ on a class. + Issue #17610: Don't rely on non-standard behavior of the C qsort() function. 12 See http://hg.python.org/cpython/file/ab05e7dd2788/Misc/NEWS for more - Drop upstreamed patches: + python-2.7rc2-configure.patch + python-2.7.3-multiprocessing-join.patch + ctypes-libffi-aarch64.patch + python-2.7.3-fix-dbm-64bit-bigendian.patch + python-test_structmembers.patch - Rebased other patches - Update to version 2.7.5: + Issue #15535: Fixed regression in the pickling of named tuples by removing the __dict__ property introduced in 2.7.4. + Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, such as was shipped with Centos 5 and Mac OS X 10.4. + Issue #17703: Fix a regression where an illegal use of Py_DECREF() after interpreter finalization can cause a crash. + Issue #16447: Fixed potential segmentation fault when setting __name__ on a class. + Issue #17610: Don't rely on non-standard behavior of the C qsort() function. 12 See http://hg.python.org/cpython/file/ab05e7dd2788/Misc/NEWS for more OBS-URL: https://build.opensuse.org/request/show/176926 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=141
83 lines
3.7 KiB
Diff
83 lines
3.7 KiB
Diff
--- a/Lib/distutils/command/install.py
|
|
+++ b/Lib/distutils/command/install.py
|
|
@@ -154,6 +154,8 @@
|
|
|
|
('record=', None,
|
|
"filename in which to record list of installed files"),
|
|
+ ('record-rpm=', None,
|
|
+ "filename in which to record list of installed files and directories suitable as filelist for rpm"),
|
|
]
|
|
|
|
boolean_options = ['compile', 'force', 'skip-build', 'user']
|
|
@@ -229,6 +231,7 @@
|
|
#self.install_info = None
|
|
|
|
self.record = None
|
|
+ self.record_rpm = None
|
|
|
|
|
|
# -- Option finalizing methods -------------------------------------
|
|
@@ -578,12 +581,61 @@
|
|
self.create_path_file()
|
|
|
|
# write list of installed files, if requested.
|
|
- if self.record:
|
|
+ if self.record or self.record_rpm:
|
|
outputs = self.get_outputs()
|
|
if self.root: # strip any package prefix
|
|
root_len = len(self.root)
|
|
for counter in xrange(len(outputs)):
|
|
outputs[counter] = outputs[counter][root_len:]
|
|
+ if self.record_rpm: # add directories
|
|
+ self.record = self.record_rpm
|
|
+ dirs = []
|
|
+ # directories to reject:
|
|
+ rejectdirs = [
|
|
+ '/etc',
|
|
+ '/',
|
|
+ '',
|
|
+ self.prefix,
|
|
+ self.exec_prefix,
|
|
+ self.install_base,
|
|
+ self.install_platbase,
|
|
+ self.install_purelib,
|
|
+ self.install_platlib,
|
|
+ self.install_headers[:len(self.install_headers) - len(self.distribution.get_name()) - 1],
|
|
+ self.install_libbase,
|
|
+ self.install_scripts,
|
|
+ self.install_data,
|
|
+ os.path.join(self.install_data, 'share'),
|
|
+ os.path.join(self.install_data, 'share', 'doc'),
|
|
+ ]
|
|
+ # directories whose childs reject:
|
|
+ rejectdirs2 = [
|
|
+ os.path.join(self.install_data, 'share', 'man'),
|
|
+ ]
|
|
+ # directories whose grandsons reject:
|
|
+ rejectdirs3 = [
|
|
+ os.path.join(self.install_data, 'share', 'man'),
|
|
+ os.path.join(self.install_data, 'share', 'locale'),
|
|
+ ]
|
|
+ for counter in xrange(len(rejectdirs)):
|
|
+ if len(rejectdirs[counter]) > root_len:
|
|
+ rejectdirs[counter] = rejectdirs[counter][root_len:]
|
|
+ for counter in xrange(len(rejectdirs2)):
|
|
+ if len(rejectdirs2[counter]) > root_len:
|
|
+ rejectdirs2[counter] = rejectdirs2[counter][root_len:]
|
|
+ for counter in xrange(len(rejectdirs3)):
|
|
+ if len(rejectdirs3[counter]) > root_len:
|
|
+ rejectdirs3[counter] = rejectdirs3[counter][root_len:]
|
|
+ for counter in xrange(len(outputs)):
|
|
+ directory = os.path.dirname(outputs[counter])
|
|
+ while directory not in rejectdirs and \
|
|
+ os.path.dirname(directory) not in rejectdirs2 and \
|
|
+ os.path.dirname(os.path.dirname(directory)) not in rejectdirs3:
|
|
+ dirname = '%dir ' + directory
|
|
+ if dirname not in dirs:
|
|
+ dirs.append(dirname)
|
|
+ directory = os.path.dirname(directory)
|
|
+ outputs += dirs
|
|
self.execute(write_file,
|
|
(self.record, outputs),
|
|
"writing list of installed files to '%s'" %
|