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
|
Description: remove and replace distutils imports.
This change fixes lintian informational message
.
uses-deprecated-python-stdlib distutils
Author: Étienne Mollier <emollier@debian.org>
Forwarded: no
Last-Update: 2025-08-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- flye.orig/setup.py
+++ flye/setup.py
@@ -17,8 +17,8 @@
from setuptools import setup
from setuptools.command.install import install as SetuptoolsInstall
-from distutils.command.build import build as DistutilsBuild
-from distutils.spawn import find_executable
+from setuptools.command.build import build as SetuptoolsBuild
+from shutil import which
# Make sure we're running from the setup.py directory.
script_dir = os.path.dirname(os.path.realpath(__file__))
@@ -28,11 +28,11 @@
from flye.__version__ import __version__
-class MakeBuild(DistutilsBuild):
+class MakeBuild(SetuptoolsBuild):
def run(self):
- DistutilsBuild.run(self)
+ SetuptoolsBuild.run(self)
- if not find_executable("make"):
+ if not which("make"):
sys.exit("ERROR: 'make' command is unavailable")
try:
subprocess.check_call(["make"])
|