aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authoridle sign <idlesign@yandex.ru>2016-12-03 22:11:21 +0700
committeridle sign <idlesign@yandex.ru>2016-12-03 22:11:21 +0700
commit06715b636916cd0a008a973d7a7cdcd16fc2feeb (patch)
tree88beab9724593e082cae5b599558a5cf19823596 /setuptools/command
parentef583b282b179d46b9e9066e5714d1d37aeaff3b (diff)
parentaac9f9f31c0fdb97c52e343be6b8a641b2341232 (diff)
downloadexternal_python_setuptools-06715b636916cd0a008a973d7a7cdcd16fc2feeb.tar.gz
external_python_setuptools-06715b636916cd0a008a973d7a7cdcd16fc2feeb.tar.bz2
external_python_setuptools-06715b636916cd0a008a973d7a7cdcd16fc2feeb.zip
Merge branch 'remote_pypa_master' into feat/setupcfg_handling
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/egg_info.py15
-rwxr-xr-xsetuptools/command/sdist.py10
2 files changed, 18 insertions, 7 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 6cc8f4c4..8a06e496 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -457,7 +457,7 @@ class FileList(_FileList):
"""
if self.allfiles is None:
self.findall()
- match = translate_pattern(os.path.join('**', pattern))
+ match = translate_pattern(os.path.join('**', '*' + pattern))
found = [f for f in self.allfiles if match.match(f)]
self.extend(found)
return bool(found)
@@ -466,7 +466,7 @@ class FileList(_FileList):
"""
Exclude all files anywhere that match the pattern.
"""
- match = translate_pattern(os.path.join('**', pattern))
+ match = translate_pattern(os.path.join('**', '*' + pattern))
return self._remove_files(match.match)
def append(self, item):
@@ -554,10 +554,17 @@ class manifest_maker(sdist):
msg = "writing manifest file '%s'" % self.manifest
self.execute(write_file, (self.manifest, files), msg)
- def warn(self, msg): # suppress missing-file warnings from sdist
- if not msg.startswith("standard file not found:"):
+ def warn(self, msg):
+ if not self._should_suppress_warning(msg):
sdist.warn(self, msg)
+ @staticmethod
+ def _should_suppress_warning(msg):
+ """
+ suppress missing-file warnings from sdist
+ """
+ return re.match(r"standard file .*not found", msg)
+
def add_defaults(self):
sdist.add_defaults(self)
self.filelist.append(self.template)
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index 9975753d..84e29a1b 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -142,9 +142,13 @@ class sdist(sdist_add_defaults, orig.sdist):
for filename in filenames])
def _add_defaults_data_files(self):
- """
- Don't add any data files, but why?
- """
+ try:
+ if six.PY2:
+ sdist_add_defaults._add_defaults_data_files(self)
+ else:
+ super()._add_defaults_data_files()
+ except TypeError:
+ log.warn("data_files contains unexpected objects")
def check_readme(self):
for f in self.READMES: