Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60908f1

Browse files
committed
Ditched the unused 'list_only' option.
Added code to include source files from 'build_clib' command to default file list -- currently this won't work, since 'build_clib' doesn't have a 'get_source_files()' method!
1 parent b2e2c29 commit 60908f1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/distutils/command/sdist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class sdist (Command):
3636

3737
('formats=', None,
3838
"formats for source distribution (tar, ztar, gztar, or zip)"),
39-
('list-only', 'l',
40-
"just list files that would be distributed"),
4139
('keep-tree', 'k',
4240
"keep the distribution tree around after creating " +
4341
"archive file(s)"),
@@ -64,7 +62,6 @@ def initialize_options (self):
6462
self.force_manifest = 0
6563

6664
self.formats = None
67-
self.list_only = 0
6865
self.keep_tree = 0
6966

7067

@@ -228,6 +225,10 @@ def find_defaults (self):
228225
build_ext = self.find_peer ('build_ext')
229226
self.files.extend (build_ext.get_source_files ())
230227

228+
if self.distribution.has_c_libraries():
229+
build_clib = self.find_peer ('build_clib')
230+
self.files.extend (build_clib.get_source_files ())
231+
231232

232233
def search_dir (self, dir, pattern=None):
233234
"""Recursively find files under 'dir' matching 'pattern' (a string

0 commit comments

Comments
 (0)