diff --git a/NEWS b/NEWS index 3aa86b6..3e0ff16 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,13 @@ Changes and improvements to testtools_, grouped by release. NEXT ~~~~ +Improvements +------------ + +* Building a wheel on Python 3 was missing ``_compat2x.py`` needed for Python2. + This was a side effect of the fix to bug #941958, where we fixed a cosmetic + error. (Robert Collins, #1430534) + 1.7.0 ~~~~~ diff --git a/setup.py b/setup.py index 5d1f1c5..96a85fb 100755 --- a/setup.py +++ b/setup.py @@ -2,10 +2,8 @@ """Distutils installer for testtools.""" from setuptools import setup -from distutils.command.build_py import build_py import email import os -import sys import testtools cmd_class = {} @@ -13,14 +11,6 @@ if getattr(testtools, 'TestCommand', None) is not None: cmd_class['test'] = testtools.TestCommand -class testtools_build_py(build_py): - def build_module(self, module, module_file, package): - if sys.version_info >= (3,) and module == '_compat2x': - return - return build_py.build_module(self, module, module_file, package) -cmd_class['build_py'] = testtools_build_py - - def get_version_from_pkg_info(): """Get the version from PKG-INFO file if we can.""" pkg_info_path = os.path.join(os.path.dirname(__file__), 'PKG-INFO') diff --git a/testtools/compat.py b/testtools/compat.py index f044dca..f4b9754 100644 --- a/testtools/compat.py +++ b/testtools/compat.py @@ -34,7 +34,7 @@ linecache = try_import('linecache2') try: from testtools import _compat2x as _compat -except (SyntaxError, ImportError): +except SyntaxError: from testtools import _compat3x as _compat reraise = _compat.reraise