[Python-checkins] CVS: distutils/distutils/command sdist.py,1.44,1.45

Greg Ward python-dev@python.org
Tue, 5 Sep 2000 19:08:26 -0700


Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv23528

Modified Files:
	sdist.py 
Log Message:
Reorganized logic in 'get_file_list()' so it's easier to read, and fixed a
  bug to boot: now works even if both MANIFEST and MANIFEST.in don't exist.
Don't hardcode setup.py, use 'self.distribution.script_name'.

Index: sdist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/sdist.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** sdist.py	2000/08/29 01:15:18	1.44
--- sdist.py	2000/09/06 02:08:24	1.45
***************
*** 220,227 ****
          #   4) no manifest, no template: generate w/ warning ("defaults only")
  
!         # Regenerate the manifest if necessary (or if explicitly told to)
!         if ((template_exists and (template_newer or setup_newer)) or
!             self.force_manifest or self.manifest_only):
  
              if not template_exists:
                  self.warn(("manifest template '%s' does not exist " +
--- 220,231 ----
          #   4) no manifest, no template: generate w/ warning ("defaults only")
  
!         manifest_outofdate = (template_exists and
!                               (template_newer or setup_newer))
!         force_regen = self.force_manifest or self.manifest_only
!         manifest_exists = os.path.isfile(self.manifest)
!         neither_exists = (not template_exists and not manifest_exists)
  
+         # Regenerate the manifest if necessary (or if explicitly told to)
+         if manifest_outofdate or neither_exists or force_regen:
              if not template_exists:
                  self.warn(("manifest template '%s' does not exist " +
***************
*** 274,281 ****
          """
  
!         # XXX name of setup script and config file should be taken
!         # programmatically from the Distribution object (except
!         # it doesn't have that capability... yet!)
!         standards = [('README', 'README.txt'), 'setup.py']
          for fn in standards:
              if type (fn) is TupleType:
--- 278,282 ----
          """
  
!         standards = [('README', 'README.txt'), self.distribution.script_name]
          for fn in standards:
              if type (fn) is TupleType: