From 12d597790e42beec7410c1afbb01a03d69dee52a Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 12 Nov 2022 18:30:55 +0200 Subject: [PATCH] Import setup from setuptools 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. In this case, the best way to deal with the problem is to just use setuptools' setup(). Fixes: https://bugs.debian.org/1022481 --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f6ccadf..b2ab78a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ # -*- coding: UTF-8 -*- -from distutils.core import setup -from setuptools import find_packages +from setuptools import find_packages, setup _version = "0.3" _packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])