Merge pull request #26273 from 78andyp/blurayfixes2
[xbmc.git] / tools / depends / native / MarkupSafe / 01-all-GH399-removedistutils.patch
blob029157b33f3228166213951a0f5812719ffd1b5e
1 From 1f6697fcb27824fefd02b5c0890a319cf17fa3de Mon Sep 17 00:00:00 2001
2 From: David Lord <davidism@gmail.com>
3 Date: Thu, 7 Sep 2023 10:17:17 -0700
4 Subject: [PATCH] import from setuptools instead of distutils
6 ---
7 setup.py | 14 +++++++-------
8 1 files changed, 7 insertions(+), 7 deletions(-)
10 diff --git a/setup.py b/setup.py
11 index 7208cdd7..d19a4faa 100644
12 --- a/setup.py
13 +++ b/setup.py
14 @@ -2,12 +2,12 @@
15 import platform
16 import sys
18 -from distutils.errors import CCompilerError
19 -from distutils.errors import DistutilsExecError
20 -from distutils.errors import DistutilsPlatformError
21 from setuptools import Extension
22 from setuptools import setup
23 from setuptools.command.build_ext import build_ext
24 +from setuptools.errors import CCompilerError
25 +from setuptools.errors import ExecError
26 +from setuptools.errors import PlatformError
28 ext_modules = [Extension("markupsafe._speedups", ["src/markupsafe/_speedups.c"])]
30 @@ -21,14 +21,14 @@ class ve_build_ext(build_ext):
32 def run(self):
33 try:
34 - build_ext.run(self)
35 - except DistutilsPlatformError as e:
36 + super().run()
37 + except PlatformError as e:
38 raise BuildFailed() from e
40 def build_extension(self, ext):
41 try:
42 - build_ext.build_extension(self, ext)
43 - except (CCompilerError, DistutilsExecError, DistutilsPlatformError) as e:
44 + super().build_extension(ext)
45 + except (CCompilerError, ExecError, PlatformError) as e:
46 raise BuildFailed() from e
47 except ValueError as e:
48 # this can happen on Windows 64 bit, see Python issue 7511