File: setuptools-60

package info (click to toggle)
python-grpc-tools 1.14.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,312 kB
  • sloc: cpp: 168,051; makefile: 875; python: 209; javascript: 110; sh: 57
file content (42 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Stefano Rivera <stefanor@debian.org>
Date: Tue, 21 Dec 2021 12:27:01 -0800
Subject: Import setuptools before distutils

setuptools 60 uses its own bundled version of distutils, by default. It
injects this into sys.modules, at import time. So we need to make sure
that it is imported, before anything else imports distutils, to ensure
everything is using the same distutils version.

This change in setuptools is to prepare for Python 3.12, which will drop
distutils.

Bug-Debian: https://bugs.debian.org/1022538
Forwarded: not-needed, upstream has resolved it already
---
 setup.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index c6bcee4..9e2b54a 100644
--- a/setup.py
+++ b/setup.py
@@ -12,9 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from distutils import cygwinccompiler
-from distutils import extension
-from distutils import util
 import errno
 import os
 import os.path
@@ -28,6 +25,9 @@ import sysconfig
 
 import setuptools
 from setuptools.command import build_ext
+from distutils import cygwinccompiler
+from distutils import extension
+from distutils import util
 
 # TODO(atash) add flag to disable Cython use