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 36507492af9e51a95fe2514e07d283b30b812dd6 Mon Sep 17 00:00:00 2001
From: Stefano Rivera <stefano@rivera.za.net>
Date: Sun, 13 Nov 2022 09:56:25 +0200
Subject: [PATCH] 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/1022525
Forwarded: https://github.com/brianolson/cbor_py/pull/21
---
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 93fc7ee..0032a93 100644
--- a/setup.py
+++ b/setup.py
@@ -16,13 +16,13 @@
# Thanks!
# to Mic Bowman for a bunch of work and impetus on dumps(,sort_keys=)
+from setuptools import setup, Extension
+
from distutils.command.build_ext import build_ext
from distutils.errors import (CCompilerError, DistutilsExecError,
DistutilsPlatformError)
import sys
-from setuptools import setup, Extension
-
build_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError)
if sys.platform == 'win32' and sys.version_info > (2, 6):
--
2.35.1
|