]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport fix for SF bug #796042: sdist ignores scripts argument in setup
authorFred Drake <fdrake@acm.org>
Thu, 1 Apr 2004 03:56:46 +0000 (03:56 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 1 Apr 2004 03:56:46 +0000 (03:56 +0000)
The fix adds a get_source_files() method to the build_scripts command
and adds the result to the default manifest list.

Doc/dist/dist.tex
Lib/distutils/command/build_scripts.py
Lib/distutils/command/sdist.py

index 30637527aea64c0a40f9601c32e4d1dd2e082a10..a273a18296093d9dc73f9b8ccd78eb90419c1312 100644 (file)
@@ -1003,6 +1003,7 @@ into the source distribution:
 \item all C source files mentioned in the \option{ext\_modules} or
   \option{libraries} options (\XXX{getting C library sources currently
     broken -- no get\_source\_files() method in build\_clib.py!})
+\item scripts identified by the \option{scripts} option
 \item anything that looks like a test script: \file{test/test*.py}
   (currently, the Distutils don't do anything with test scripts except
   include them in source distributions, but in the future there will be
index 8de9cd3f6d9c8cb441295217f8aee9e0372075f9..165a009dedc5ff3f11f53ccfd9e1a13287dd06e5 100644 (file)
@@ -41,6 +41,8 @@ class build_scripts (Command):
                                    ('force', 'force'))
         self.scripts = self.distribution.scripts
 
+    def get_source_files(self):
+        return self.scripts
 
     def run (self):
         if not self.scripts:
index c0b7dd45d977811e2c1b3e749ccdcfc083cb7a95..0a29addba61a30f9027bf0c7f6a34211c7f2a97d 100644 (file)
@@ -304,6 +304,10 @@ class sdist (Command):
             build_clib = self.get_finalized_command('build_clib')
             self.filelist.extend(build_clib.get_source_files())
 
+        if self.distribution.has_scripts():
+            build_scripts = self.get_finalized_command('build_scripts')
+            self.filelist.extend(build_scripts.get_source_files())
+
     # add_defaults ()