File: setuptools-60

package info (click to toggle)
python-openflow 2019.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,224 kB
  • sloc: python: 6,635; sh: 4; makefile: 4
file content (41 lines) | stat: -rw-r--r-- 1,423 bytes parent folder | download
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
From: Stefano Rivera <stefanor@debian.org>
Date: Sat, 12 Nov 2022 10:41:06 +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/kytos/python-openflow/pull/643
Bug-Debian: https://bugs.debian.org/1022459
---
 setup.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index b579f96..1d3bad5 100644
--- a/setup.py
+++ b/setup.py
@@ -4,14 +4,15 @@ Run "python3 setup --help-commands" to list all available commands and their
 descriptions.
 """
 from abc import abstractmethod
-# Disabling checks due to https://github.com/PyCQA/pylint/issues/73
-# pylint: disable=import-error,no-name-in-module
-from distutils.command.clean import clean
 # pylint: enable=import-error,no-name-in-module
 from subprocess import CalledProcessError, call, check_call
 
 from setuptools import Command, find_packages, setup
 
+# Disabling checks due to https://github.com/PyCQA/pylint/issues/73
+# pylint: disable=import-error,no-name-in-module
+from distutils.command.clean import clean
+
 from pyof import __version__