Skip to content

Commit

Permalink
do not change py36compat, put changes into sdist command
Browse files Browse the repository at this point in the history
  • Loading branch information
daa committed Jan 11, 2019
1 parent 1d6bcf1 commit d53e024
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools/command/py36compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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', 'pyproject.toml']
optional = ['test/test*.py', 'setup.cfg']
for pattern in optional:
files = filter(os.path.isfile, glob(pattern))
self.filelist.extend(files)
Expand Down
8 changes: 8 additions & 0 deletions setuptools/command/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ def __read_template_hack(self):
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():
Expand Down

0 comments on commit d53e024

Please sign in to comment.