# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/markupsafe/hotfix-distutils.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- MarkupSafe-2.1.5/setup.py.vanilla 2024-02-04 21:24:34.748000963 +0100 +++ MarkupSafe-2.1.5/setup.py 2024-02-04 21:26:45.892001025 +0100 @@ -2,12 +2,12 @@ import platform import sys -from distutils.errors import CCompilerError -from distutils.errors import DistutilsExecError -from distutils.errors import DistutilsPlatformError from setuptools import Extension from setuptools import setup from setuptools.command.build_ext import build_ext +from setuptools.errors import CCompilerError +from setuptools.errors import ExecError +from setuptools.errors import PlatformError ext_modules = [Extension(markupsafe._speedups, [src/markupsafe/_speedups.c])] @@ -21,14 +21,14 @@ def run(self): try: - build_ext.run(self) - except DistutilsPlatformError as e: + super().run() + except PlatformError as e: raise BuildFailed() from e def build_extension(self, ext): try: - build_ext.build_extension(self, ext) - except (CCompilerError, DistutilsExecError, DistutilsPlatformError) as e: + super().build_extension(ext) + except (CCompilerError, ExecError, PlatformError) as e: raise BuildFailed() from e except ValueError as e: # this can happen on Windows 64 bit, see Python issue 7511