? redhat ? rpm.patch ? dry_run.patch ? MANIFEST ? package_data ? install_options.patch ? long_description.patch ? exeception_error.patch ? bdist_rpm.patch ? Distutils-0.8.2.tar.gz ? distutils/command/bdist_rpm.py Index: MANIFEST.in =================================================================== RCS file: /projects/cvsroot/distutils/MANIFEST.in,v retrieving revision 1.4 diff -u -r1.4 MANIFEST.in --- MANIFEST.in 2000/04/21 04:38:11 1.4 +++ MANIFEST.in 2000/05/02 07:52:16 @@ -9,7 +9,9 @@ # include *.txt +include package_data include MANIFEST.in +include redhat/*.spec recursive-include examples *.txt *.py prune examples/sample?/build recursive-include doc *.sty *.tex Index: distutils/command/__init__.py =================================================================== RCS file: /projects/cvsroot/distutils/distutils/command/__init__.py,v retrieving revision 1.8 diff -u -r1.8 __init__.py --- __init__.py 2000/03/31 03:14:51 1.8 +++ __init__.py 2000/05/02 07:52:16 @@ -15,4 +15,5 @@ 'sdist', 'bdist', 'bdist_dumb', + 'bdist_rpm', ] Index: distutils/command/bdist.py =================================================================== RCS file: /projects/cvsroot/distutils/distutils/command/bdist.py,v retrieving revision 1.5 diff -u -r1.5 bdist.py --- bdist.py 2000/04/25 01:38:19 1.5 +++ bdist.py 2000/05/02 07:52:17 @@ -31,8 +31,12 @@ 'bztar': 'bdist_dumb', 'ztar': 'bdist_dumb', 'tar': 'bdist_dumb', - 'zip': 'bdist_dumb', } + 'zip': 'bdist_dumb', + 'rpm': 'bdist_rpm', + } + # The following commands do not take a format option from bdist + no_format_option = ( 'bdist_rpm', ) def initialize_options (self): self.format = None @@ -63,8 +67,9 @@ raise DistutilsOptionError, \ "invalid archive format '%s'" % self.format - sub_cmd = self.find_peer (cmd_name) - sub_cmd.set_option ('format', self.format) + if cmd_name not in self.no_format_option: + sub_cmd = self.find_peer (cmd_name) + sub_cmd.set_option ('format', self.format) self.run_peer (cmd_name) # run() Index: distutils/command/install.py =================================================================== RCS file: /projects/cvsroot/distutils/distutils/command/install.py,v retrieving revision 1.23 diff -u -r1.23 install.py --- install.py 2000/04/27 01:56:38 1.23 +++ install.py 2000/05/02 07:52:20 @@ -12,6 +12,7 @@ from distutils import sysconfig from distutils.util import write_file, native_path, subst_vars, change_root from distutils.errors import DistutilsOptionError +from glob import glob INSTALL_SCHEMES = { 'unix_prefix': { @@ -82,9 +83,11 @@ #('install-man=', None, "directory for Unix man pages"), #('install-html=', None, "directory for HTML documentation"), #('install-info=', None, "directory for GNU info files"), - ] + ('record', None, + "make a record of installation")] + # 'sub_commands': a list of commands this command might have to run # to get its work done. Each command is represented as a tuple # (func, command) where 'func' is a function to call that returns @@ -141,6 +144,7 @@ #self.install_html = None #self.install_info = None + self.record = None def finalize_options (self): @@ -267,7 +271,8 @@ from distutils.fancy_getopt import longopt_xlate print msg + ":" for opt in self.user_options: - opt_name = string.translate (opt[0][0:-1], longopt_xlate) + if opt[0][-1] == '=': + opt_name = string.translate (opt[0][0:-1], longopt_xlate) val = getattr (self, opt_name) print " %s: %s" % (opt_name, val) @@ -424,6 +429,24 @@ "Python's module search path (sys.path) -- " + "you'll have to change the search path yourself") % self.install_lib) + + + # write list of installed files, if requested. + if self.record: + outputs = self.get_outputs() + for counter in xrange (len (outputs)): # include ".pyc" and ".pyo" + if outputs[counter][-3:] == ".py": + byte_code = glob(outputs[counter] + '[co]') + outputs.extend(byte_code) + outputs.sort() # just makes it look nicer + if self.root: # strip any package prefix + root_len = len(self.root) + for counter in xrange (len (outputs)): + outputs[counter] = outputs[counter][root_len:] + self.execute(write_file, + ("INSTALLED_FILES", outputs), + "Writing list of installed files") + # run ()