diff --git a/debian/changelog b/debian/changelog index 23dc5e2ef1c7f90740a745e6ca4a2bc2ec271b64..c279b72213c4daebb36b42857b1380b8f1bffb3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-ldap3 (2.9.1-2) UNRELEASED; urgency=medium + + * Patch: Support setuptools >= 60. (Closes: #1022446) + + -- Stefano Rivera <stefanor@debian.org> Fri, 11 Nov 2022 23:12:19 +0200 + python-ldap3 (2.9.1-1) unstable; urgency=low * Team upload. diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000000000000000000000000000000000000..092d259ff31723387f2d1e9c858aa40dc359cab4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +setuptools-60 diff --git a/debian/patches/setuptools-60 b/debian/patches/setuptools-60 new file mode 100644 index 0000000000000000000000000000000000000000..e6d1c2e0191be7878a0ca3a41fde678d61a7fb25 --- /dev/null +++ b/debian/patches/setuptools-60 @@ -0,0 +1,33 @@ +From: Stefano Rivera <stefanor@debian.org> +Date: Fri, 11 Nov 2022 23:11:16 +0200 +Subject: Import setuptools before distutils + +setuptools 60 uses its own bunlded 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. + +Forwarded: https://github.com/cannatag/ldap3/pull/1066 +Bug-Debian: https://bugs.debian.org/1022446 +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index df99a8a..238d641 100644 +--- a/setup.py ++++ b/setup.py +@@ -26,9 +26,9 @@ import os + import glob + import shutil + from json import load ++from setuptools import setup + from distutils.command.clean import clean + from distutils import log +-from setuptools import setup + + version_dict = load(open('_version.json', 'r')) + version = str(version_dict['version'])