diff options
author | Éric Araujo <merwok@netwok.org> | 2011-05-31 16:04:32 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-05-31 16:04:32 (GMT) |
commit | 9deedf696eeb9a015118d1d0c76bf8318f2190d2 (patch) | |
tree | 8ae467a6de6102b27017c02972bf538230511d44 /Lib/packaging/command | |
parent | a94bdee2e479cdfa6b98c7d823380a88dcb8c9fd (diff) | |
download | cpython-9deedf696eeb9a015118d1d0c76bf8318f2190d2.zip cpython-9deedf696eeb9a015118d1d0c76bf8318f2190d2.tar.gz cpython-9deedf696eeb9a015118d1d0c76bf8318f2190d2.tar.bz2 |
Re-apply distutils2 changes lost before the merge of packaging.
wrap_text was removed in favor of standard textwrap but the removal of the
function was lost in a bad merge; a change in sdist mysteriously disappeared.
Diffstat (limited to 'Lib/packaging/command')
-rw-r--r-- | Lib/packaging/command/sdist.py | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/Lib/packaging/command/sdist.py b/Lib/packaging/command/sdist.py index a28019b..a19203f 100644 --- a/Lib/packaging/command/sdist.py +++ b/Lib/packaging/command/sdist.py @@ -1,10 +1,9 @@ """Create a source distribution.""" import os -import sys import re +import sys from io import StringIO -from glob import glob from shutil import get_archive_formats, rmtree from packaging import logger @@ -203,45 +202,14 @@ class sdist(Command): def add_defaults(self): """Add all the default files to self.filelist: - - README or README.txt - - test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) - Warns if (README or README.txt) or setup.py are missing; everything - else is optional. + Everything is optional. """ - standards = [('README', 'README.txt')] - for fn in standards: - if isinstance(fn, tuple): - alts = fn - got_it = False - for fn in alts: - if os.path.exists(fn): - got_it = True - self.filelist.append(fn) - break - - if not got_it: - logger.warning( - '%s: standard file not found: should have one of %s', - self.get_command_name(), ', '.join(alts)) - else: - if os.path.exists(fn): - self.filelist.append(fn) - else: - logger.warning('%s: standard file %r not found', - self.get_command_name(), fn) - - optional = ['test/test*.py', 'setup.cfg'] - for pattern in optional: - files = [f for f in glob(pattern) if os.path.isfile(f)] - if files: - self.filelist.extend(files) - for cmd_name in get_command_names(): try: cmd_obj = self.get_finalized_command(cmd_name) |