From 1b80e11922690829be0a57e81741609bd12d98bf Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Sun, 20 Dec 2020 14:19:26 +0100 Subject: [PATCH 1/2] add tests/test*.py to sdist default inclusion list --- setuptools/_distutils/command/sdist.py | 4 ++-- setuptools/command/py36compat.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/_distutils/command/sdist.py b/setuptools/_distutils/command/sdist.py index b4996fcb1d..1b28076800 100644 --- a/setuptools/_distutils/command/sdist.py +++ b/setuptools/_distutils/command/sdist.py @@ -211,7 +211,7 @@ def add_defaults(self): """Add all the default files to self.filelist: - README or README.txt - setup.py - - test/test*.py + - tests/test*.py and 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. @@ -268,7 +268,7 @@ def _add_defaults_standards(self): self.warn("standard file '%s' not found" % fn) def _add_defaults_optional(self): - optional = ['test/test*.py', 'setup.cfg'] + optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index 343547a4d3..5d1b4af8bf 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -17,7 +17,7 @@ def add_defaults(self): """Add all the default files to self.filelist: - README or README.txt - setup.py - - test/test*.py + - tests/test*.py and 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. @@ -74,7 +74,7 @@ def _add_defaults_standards(self): self.warn("standard file '%s' not found" % fn) def _add_defaults_optional(self): - optional = ['test/test*.py', 'setup.cfg'] + optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) From 9093c45dc9b60c7f3f864967927e722cca81c894 Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Sun, 20 Dec 2020 15:04:28 +0100 Subject: [PATCH 2/2] Add changelog rst --- changelog.d/2494.change.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/2494.change.rst diff --git a/changelog.d/2494.change.rst b/changelog.d/2494.change.rst new file mode 100644 index 0000000000..de165cf2cd --- /dev/null +++ b/changelog.d/2494.change.rst @@ -0,0 +1,2 @@ +Add tests/test*.py to sdist default inclusion list. +-- by :user:`tomchen`