diff options
Diffstat (limited to 'setuptools/command')
| -rwxr-xr-x | setuptools/command/egg_info.py | 4 | ||||
| -rwxr-xr-x | setuptools/command/sdist.py | 7 | ||||
| -rw-r--r-- | setuptools/command/test.py | 7 |
3 files changed, 4 insertions, 14 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a183d15d..a1d41b27 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -160,9 +160,7 @@ class egg_info(Command): build tag. Install build keys in a deterministic order to avoid arbitrary reordering on subsequent builds. """ - # python 2.6 compatibility - odict = getattr(collections, 'OrderedDict', dict) - egg_info = odict() + egg_info = collections.OrderedDict() # follow the order these keys would have been added # when PYTHONHASHSEED=0 egg_info['tag_build'] = self.tags() diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 508148e0..bcfae4d8 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -51,13 +51,6 @@ class sdist(sdist_add_defaults, orig.sdist): for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) - # Call check_metadata only if no 'check' command - # (distutils <= 2.6) - import distutils.command - - if 'check' not in distutils.command.__all__: - self.check_metadata() - self.make_distribution() dist_files = getattr(self.distribution, 'dist_files', []) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index bfa71496..51aee1f7 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -3,6 +3,7 @@ import operator import sys import contextlib import itertools +import unittest from distutils.errors import DistutilsError, DistutilsOptionError from distutils import log from unittest import TestLoader @@ -14,7 +15,6 @@ from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint) from setuptools import Command -from setuptools.py31compat import unittest_main class ScanningLoader(TestLoader): @@ -241,12 +241,11 @@ 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} - test = unittest_main( + test = unittest.main( None, None, self._argv, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), - **exit_kwarg + exit=False, ) if not test.result.wasSuccessful(): msg = 'Test failed: %s' % test.result |
