Debian Codegraph @

debian/patches/no-distutils

raw
1 From: Michael R. Crusoe <[email protected]>
2 Subject: Don't use the deprecated distutils
3
4 It isn't available in Python 3.12
5
6 --- azure-uamqp-python.orig/setup.py
7 +++ azure-uamqp-python/setup.py
8 @@ -7,14 +7,13 @@
9 import os
10 import sys
11 import re
12 -import distutils
13 import subprocess
14 import platform
15 from setuptools import find_packages, monkey, setup, Extension
16 from setuptools.command.build_ext import build_ext as build_ext_orig
17 -from distutils.extension import Extension
18 -from distutils.version import LooseVersion
19 -from distutils import log as logger
20 +import logging
21 +
22 +logger = logging.getLogger()
23
24 try:
25 from Cython.Build import cythonize
26 @@ -101,12 +100,6 @@
27 return " ".join(flags)
28
29
30 -def get_msvc_env(vc_ver):
31 - arch = "amd64" if is_x64 else "x86"
32 - msvc_env = distutils.msvc9compiler.query_vcvarsall(vc_ver, arch)
33 - return {str(k.upper()): str(v) for k, v in msvc_env.items()}
34 -
35 -
36 # Compile uamqp
37 # Inspired by https://stackoverflow.com/a/48015772/4074838
38