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 8a06e496..40cea9bf 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -158,9 +158,7 @@ class egg_info(Command): build tag. Install these 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 84e29a1b..39e29d73 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -50,13 +50,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 9a5117be..9931565b 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 DistutilsOptionError from unittest import TestLoader @@ -13,7 +14,6 @@ from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint) from setuptools import Command -from setuptools.py31compat import unittest_main class ScanningLoader(TestLoader): @@ -225,12 +225,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} - unittest_main( + 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, ) @property |
