aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/build_py.py2
-rwxr-xr-xsetuptools/command/egg_info.py15
-rwxr-xr-xsetuptools/command/sdist.py10
-rw-r--r--setuptools/command/test.py2
4 files changed, 21 insertions, 8 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py
index 289e6fb8..b0314fd4 100644
--- a/setuptools/command/build_py.py
+++ b/setuptools/command/build_py.py
@@ -219,7 +219,7 @@ class build_py(orig.build_py, Mixin2to3):
@staticmethod
def _get_platform_patterns(spec, package, src_dir):
"""
- yield platfrom-specific path patterns (suitable for glob
+ yield platform-specific path patterns (suitable for glob
or fn_match) from a glob-based spec (such as
self.package_data or self.exclude_package_data)
matching package in src_dir.
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:
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 270674e2..9a5117be 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -225,10 +225,12 @@ class test(Command):
del_modules.append(name)
list(map(sys.modules.__delitem__, del_modules))
+ exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False}
unittest_main(
None, None, self._argv,
testLoader=self._resolve_as_ep(self.test_loader),
testRunner=self._resolve_as_ep(self.test_runner),
+ **exit_kwarg
)
@property