diff --git a/setup.py b/setup.py index b4b91ca..dbc5946 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ def run(self): shutil.rmtree(outdir) -class CommandMixin(object): +class CommandMixin: @classmethod def _read_and_stat(cls, src): from distutils.errors import DistutilsFileError @@ -75,8 +75,10 @@ def copy_file(self, src, dst, preserve_mode=1, preserve_times=1, link=None, data, re.MULTILINE) if not m: - return super(CommandMixin, self).copy_file( - src, dst, preserve_mode=preserve_mode, + # Not using super() for better Python 2.x compatibility (distutils + # uses old-style classes). + return distutils.core.Command.copy_file( + self, src, dst, preserve_mode=preserve_mode, preserve_times=preserve_times, link=link) if os.path.isdir(dst): diff --git a/version-history.rst b/version-history.rst index eae2b57..7a38a85 100644 --- a/version-history.rst +++ b/version-history.rst @@ -1,10 +1,17 @@ Version History --------------- +2.4.2: 2021/01/03 + +- Remove use of ‘super’ in ``setup.py`` to fix compatibility with + Python 2.7. This changes build code only; no changes to the library + itself. + 2.4.1: 2020/11/20 - Remove dependency on ``packaging`` module from ``setup.py`` to fix - installation on systems without that package. [Thanks to Eric + installation on systems without that package. This changes build + code only; no changes to the library itself. [Thanks to Eric McLachlan for reporting] 2.4.0: 2020/11/19 [pulled back from PyPi]