aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorAlexander Duryagin <aduryagin@gmail.com>2019-01-11 15:57:54 +0300
committerAlexander Duryagin <aduryagin@gmail.com>2019-01-11 15:57:54 +0300
commitd53e024af2f5d8f3a4a36588c3dc004d156bc830 (patch)
treeffa8df1cbf7813522570a521101d3b05fa421fdb /setuptools/command
parent1d6bcf1730a8490a2a16fe2eac73a5437f743dd2 (diff)
downloadexternal_python_setuptools-d53e024af2f5d8f3a4a36588c3dc004d156bc830.tar.gz
external_python_setuptools-d53e024af2f5d8f3a4a36588c3dc004d156bc830.tar.bz2
external_python_setuptools-d53e024af2f5d8f3a4a36588c3dc004d156bc830.zip
do not change py36compat, put changes into sdist command
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/py36compat.py2
-rw-r--r--setuptools/command/sdist.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py
index c256bfb8..61063e75 100644
--- a/setuptools/command/py36compat.py
+++ b/setuptools/command/py36compat.py
@@ -76,7 +76,7 @@ class sdist_add_defaults:
self.warn("standard file '%s' not found" % fn)
def _add_defaults_optional(self):
- optional = ['test/test*.py', 'setup.cfg', 'pyproject.toml']
+ optional = ['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/sdist.py b/setuptools/command/sdist.py
index bcfae4d8..40965a67 100644
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -121,6 +121,14 @@ class sdist(sdist_add_defaults, orig.sdist):
if has_leaky_handle:
read_template = __read_template_hack
+ def _add_defaults_optional(self):
+ if six.PY2:
+ sdist_add_defaults._add_defaults_optional(self)
+ else:
+ super()._add_defaults_optional()
+ if os.path.isfile('pyproject.toml'):
+ self.filelist.append('pyproject.toml')
+
def _add_defaults_python(self):
"""getting python files"""
if self.distribution.has_pure_modules():