Skip to content

Commit 4330386

Browse files
Add tests/test*.py to source distributions
Because most Python packages maintain tests in top-level directory `tests/` instead of `test/`, add both to source distributions for consistency.
1 parent e0787fa commit 4330386

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

distutils/command/sdist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def add_defaults(self):
235235
"""Add all the default files to self.filelist:
236236
- README or README.txt
237237
- setup.py
238-
- test/test*.py
238+
- tests/test*.py and test/test*.py
239239
- all pure Python modules mentioned in setup script
240240
- all files pointed by package_data (build_py)
241241
- all files defined in data_files.
@@ -293,7 +293,7 @@ def _add_defaults_standards(self):
293293
self.warn("standard file '%s' not found" % fn)
294294

295295
def _add_defaults_optional(self):
296-
optional = ['test/test*.py', 'setup.cfg']
296+
optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg']
297297
for pattern in optional:
298298
files = filter(os.path.isfile, glob(pattern))
299299
self.filelist.extend(files)

0 commit comments

Comments
 (0)