From: Fred Drake Date: Thu, 1 Apr 2004 03:56:46 +0000 (+0000) Subject: backport fix for SF bug #796042: sdist ignores scripts argument in setup X-Git-Tag: v2.3.4c1~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40039f2da0febd82cad5cb02ac994bfc38650ec8;p=thirdparty%2FPython%2Fcpython.git backport fix for SF bug #796042: sdist ignores scripts argument in setup The fix adds a get_source_files() method to the build_scripts command and adds the result to the default manifest list. --- diff --git a/Doc/dist/dist.tex b/Doc/dist/dist.tex index 30637527aea6..a273a1829609 100644 --- a/Doc/dist/dist.tex +++ b/Doc/dist/dist.tex @@ -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 diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index 8de9cd3f6d9c..165a009dedc5 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -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: diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index c0b7dd45d977..0a29addba61a 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -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 ()