summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-12-11 15:42:28 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-12-11 15:50:00 +0100
commit98aecd3a5eb2b3a4018213eb40ee9966554d8ca2 (patch)
tree220428217e606c8dd2410b1e2658eba79f640052 /gnu
parentb47e083b594dc2c6c26e93723e6244d964f4d19d (diff)
downloadguix-98aecd3a5eb2b3a4018213eb40ee9966554d8ca2.tar.gz
gnu: python-argcomplete: Update to 1.10.3.
Co-authored-by: pimi <madalinionel.patrascu@mdc-berlin.de>

* gnu/packages/python-xyz.scm (python-argcomplete): Update to 1.10.3.
[arguments]: Patch completion script to keep tool references.
[inputs]: Add "grep" and "which".
[native-inputs]: Add "python-coverage", "python-flake8", "python-wheel", and
"fish".
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm40
1 files changed, 31 insertions, 9 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 57c40aa3f0..03dddcde43 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11768,19 +11768,41 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
 (define-public python-argcomplete
   (package
     (name "python-argcomplete")
-    (version "1.7.0")
+    (version "1.10.3")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "argcomplete" version))
-        (sha256
-          (base32
-            "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "argcomplete" version))
+       (sha256
+        (base32
+         "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'embed-tool-references
+           (lambda _
+             (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
+               ((" grep")
+                (string-append " " (which "grep")))
+               ((" egrep")
+                (string-append " " (which "egrep")))
+               (("elif which")
+                (string-append "elif " (which "which")))
+               (("\\$\\(which")
+                (string-append "$(" (which "which"))))
+             #t)))))
+    (inputs
+     `(("grep" ,grep)
+       ("which" ,which)))
     (native-inputs
-     `(("python-pexpect" ,python-pexpect)
+     `(("python-coverage" ,python-coverage)
+       ("python-flake8" ,python-flake8)
+       ("python-pexpect" ,python-pexpect)
+       ("python-wheel" ,python-wheel)
        ("tcsh" ,tcsh)
-       ("bash-full" ,bash)))             ;full Bash for 'test_file_completion'
+       ("fish" ,fish)
+       ("bash-full" ,bash)))            ;full Bash for 'test_file_completion'
     (home-page "https://github.com/kislyuk/argcomplete")
     (synopsis "Shell tab completion for Python argparse")
     (description "argcomplete provides extensible command line tab completion