Package: galternatives Version: 0.92.3 Tags: patch please avoid the runtime dependency on distutils. The standard library has shutil.which available with the same functionality.
diff -Nru galternatives-0.92.3/debian/changelog galternatives-0.92.3ubuntu1/debian/changelog --- galternatives-0.92.3/debian/changelog 2018-03-23 07:22:06.000000000 +0000 +++ galternatives-0.92.3ubuntu1/debian/changelog 2018-04-05 09:54:08.000000000 +0000 @@ -1,3 +1,9 @@ +galternatives (0.92.3ubuntu1) bionic; urgency=medium + + * Avoid runtime dependency on distutils. + + -- Matthias Klose <d...@ubuntu.com> Thu, 05 Apr 2018 11:54:08 +0200 + galternatives (0.92.3) unstable; urgency=medium * Add Danish translation (by scootergrisen). diff -Nru galternatives-0.92.3/debian/control galternatives-0.92.3ubuntu1/debian/control --- galternatives-0.92.3/debian/control 2018-03-23 07:22:06.000000000 +0000 +++ galternatives-0.92.3ubuntu1/debian/control 2018-04-05 09:54:05.000000000 +0000 @@ -20,7 +20,6 @@ Architecture: all Depends: gir1.2-gtk-3.0, - python3-distutils, python3-gi, ${misc:Depends}, ${python3:Depends}, diff -Nru galternatives-0.92.3/galternatives/app.py galternatives-0.92.3ubuntu1/galternatives/app.py --- galternatives-0.92.3/galternatives/app.py 2018-01-30 16:11:54.000000000 +0000 +++ galternatives-0.92.3ubuntu1/galternatives/app.py 2018-04-05 09:52:56.000000000 +0000 @@ -9,7 +9,7 @@ except ImportError: set_logger = None -from distutils import spawn +import shutil from gi.repository import Gio, GLib, Gtk import os @@ -55,7 +55,7 @@ if options.contains('normal'): logger.warn(_( 'No root detected, but continue as in your wishes')) - elif spawn.find_executable('pkexec'): + elif shutil.which('pkexec'): self.use_polkit = True else: dialog = Gtk.MessageDialog( diff -Nru galternatives-0.92.3/galternatives/gui.py galternatives-0.92.3ubuntu1/galternatives/gui.py --- galternatives-0.92.3/galternatives/gui.py 2018-01-30 16:11:54.000000000 +0000 +++ galternatives-0.92.3ubuntu1/galternatives/gui.py 2018-04-05 09:53:44.000000000 +0000 @@ -9,7 +9,7 @@ from .utils import GtkTemplate, stateful_property from copy import deepcopy -from distutils import spawn +import shutil from functools import wraps from gi.repository import GdkPixbuf, Gio, GLib, Gtk, GObject import os @@ -348,7 +348,7 @@ self.paths = paths self.group = alternative.Group(group, create=True) if group else None self.use_polkit = app.use_polkit if app else \ - os.getuid() and bool(spawn.find_executable('pkexec')) + os.getuid() and bool(shutil.which('pkexec')) # glade XML self.builder = Gtk.Builder.new_from_file(