Control: reopen -1
Control: retitle -1 s3cmd: avoid the runtime dependency on distutils
Please don't depend on distutils, when the dependency can be avoided at runtime.
See the attached patch.
diff -Nru s3cmd-2.0.1/debian/changelog s3cmd-2.0.1/debian/changelog
--- s3cmd-2.0.1/debian/changelog 2018-04-12 17:09:38.0 +
+++ s3cmd-2.0.1/debian/changelog 2018-04-30 05:31:16.0 +
@@ -1,3 +1,10 @@
+s3cmd (2.0.1-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Avoid the use of distutils at runtime.
+
+ -- Matthias Klose Mon, 30 Apr 2018 07:31:16 +0200
+
s3cmd (2.0.1-2) unstable; urgency=medium
[ Nishanth Aravamudan ]
diff -Nru s3cmd-2.0.1/debian/control s3cmd-2.0.1/debian/control
--- s3cmd-2.0.1/debian/control 2018-04-12 17:09:38.0 +
+++ s3cmd-2.0.1/debian/control 2018-04-30 05:31:10.0 +
@@ -16,7 +16,7 @@
Package: s3cmd
Architecture: all
-Depends: ${misc:Depends}, ${python3:Depends}, python3-distutils
+Depends: ${misc:Depends}, ${python3:Depends}
Description: command-line Amazon S3 client
Command-line tool to upload, retrieve and manage data in Amazon S3 service
(http://www.amazon.com/s3/), designed for use in scripts. Features:
diff -Nru s3cmd-2.0.1/debian/patches/avoid-distutils.diff s3cmd-2.0.1/debian/patches/avoid-distutils.diff
--- s3cmd-2.0.1/debian/patches/avoid-distutils.diff 1970-01-01 00:00:00.0 +
+++ s3cmd-2.0.1/debian/patches/avoid-distutils.diff 2018-04-30 05:31:16.0 +
@@ -0,0 +1,20 @@
+--- a/s3cmd
b/s3cmd
+@@ -57,7 +57,7 @@ import tempfile
+ from copy import copy
+ from optparse import OptionParser, Option, OptionValueError, IndentedHelpFormatter
+ from logging import debug, info, warning, error
+-from distutils.spawn import find_executable
++from shutil import which
+
+ from ssl import SSLError
+ import io
+@@ -2267,7 +2267,7 @@ def run_configure(config_file, args):
+ ]
+ ## Option-specfic defaults
+ if getattr(cfg, "gpg_command") == "":
+-setattr(cfg, "gpg_command", find_executable("gpg"))
++setattr(cfg, "gpg_command", which("gpg"))
+
+ if getattr(cfg, "proxy_host") == "" and os.getenv("http_proxy"):
+ autodetected_encoding = locale.getpreferredencoding() or "UTF-8"
diff -Nru s3cmd-2.0.1/debian/patches/series s3cmd-2.0.1/debian/patches/series
--- s3cmd-2.0.1/debian/patches/series 1970-01-01 00:00:00.0 +
+++ s3cmd-2.0.1/debian/patches/series 2018-04-30 05:29:55.0 +
@@ -0,0 +1 @@
+avoid-distutils.diff