From 793fb44ab00b78ff56f55331fda479161f1d6eba Mon Sep 17 00:00:00 2001 From: Adrien Banlin Date: Tue, 31 May 2022 14:57:12 +0200 Subject: [PATCH] distutils: fix dependency and lib replacement As of now, the distutils is deprecated with removal planned for python 3.12. The recommended way is to use setuptools which is an enhanced alternative to distutils maintained by the python packaging authority. This commit replace with setuptools the distutil import inserted in the 8126ef0c00eb8e2faae2cf1ca9fbaf25c10582cd commit. This commit also update the debian control runtime dependency. distutils: https://docs.python.org/3/library/distutils.html setuptools: https://setuptools.pypa.io/en/latest/ --- debian/control | 2 +- ifupdown2/addons/address.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index b9cd3b0..b5bfed7 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Architecture: all Provides: ifupdown Conflicts: ifupdown Replaces: ifupdown -Depends: ${python3:Depends}, ${misc:Depends}, iproute2 +Depends: ${python3:Depends}, ${misc:Depends}, iproute2, python3-setuptools Suggests: isc-dhcp-client, bridge-utils, ethtool, python3-gvgen, python3-mako Description: Network Interface Management tool similar to ifupdown ifupdown2 is ifupdown re-written in Python. It replaces ifupdown and provides diff --git a/ifupdown2/addons/address.py b/ifupdown2/addons/address.py index fc7702f..1ea4df6 100644 --- a/ifupdown2/addons/address.py +++ b/ifupdown2/addons/address.py @@ -9,7 +9,7 @@ import json import time import subprocess -from distutils.util import strtobool +from setuptools.dist import strtobool try: from ifupdown2.lib.addon import AddonWithIpBlackList