diff mbox series

[bug#53046,v2] gnu: Patch reference to basestring.

Message ID 20220117133451.9510-1-tanguy@bioneland.org
State Accepted
Headers show
Series [bug#53046,v2] gnu: Patch reference to basestring. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Tanguy LE CARROUR Jan. 17, 2022, 1:34 p.m. UTC
* gnu/packages/python-xyz.scm (python-args): Use tho latest version
from the git repository to get the test suite.
* gnu/packages/python-xyz.scm (python-args)[arguments]: Replace
reference to basestring with str. Invoke nosetests.
* gnu/packages/python-xyz.scm (python-args)[native-inputs]: Add
python-nose.
---
 gnu/packages/python-xyz.scm | 44 ++++++++++++++++++++++++-------------
 1 file changed, 29 insertions(+), 15 deletions(-)

Comments

M Jan. 17, 2022, 2:14 p.m. UTC | #1
Hi,

Tanguy Le Carrour schreef op ma 17-01-2022 om 14:34 [+0100]:
> +                    (replace 'check
> +                      (lambda _
> +                        (invoke "nosetests" "-v"))))))

This needs to be

(lambda* (#:key tests? #:allow-other-keys)
  (when tests?
    (invoke ...)))

to make "--without-tests" work.

Greetings,
Maxime.
Tanguy LE CARROUR Jan. 17, 2022, 2:22 p.m. UTC | #2
Hi Maxime,


Quoting Maxime Devos (2022-01-17 15:14:00)
> Tanguy Le Carrour schreef op ma 17-01-2022 om 14:34 [+0100]:
> > +                    (replace 'check
> > +                      (lambda _
> > +                        (invoke "nosetests" "-v"))))))
> 
> This needs to be
> 
> (lambda* (#:key tests? #:allow-other-keys)
>   (when tests?
>     (invoke ...)))
> 
> to make "--without-tests" work.

Oh, OK, good to know! Thanks!

I'm fixing it and sending a v3.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 80ce58400a..4f2e9cb73d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13368,21 +13368,35 @@  (define-public python-icalendar
     (license license:bsd-2)))
 
 (define-public python-args
-  (package
-    (name "python-args")
-    (version "0.1.0")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "args" version))
-              (sha256
-               (base32
-                "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
-    (build-system python-build-system)
-    (home-page "https://github.com/kennethreitz/args")
-    (synopsis "Command-line argument parser")
-    (description
-     "This library provides a Python module to parse command-line arguments.")
-    (license license:bsd-3)))
+  (let ((commit "9460f1a35eb3055e9e4de1f0a6932e0883c72d65") (revision "0"))
+    (package
+      (name "python-args")
+      (version (git-version "0.1.0" revision commit))
+      (home-page "https://github.com/kennethreitz/args")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1zfxpbp9vldqdrjmd0c6y3wisl35mx5v8zlyp3nhwpy1730wrc9j"))))
+      (build-system python-build-system)
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (add-after 'unpack 'patch-args.py
+                      (lambda _
+                        (substitute* "args.py"
+                          (("basestring") "str"))))
+                    (replace 'check
+                      (lambda _
+                        (invoke "nosetests" "-v"))))))
+      (native-inputs (list python-nose))
+      (synopsis "Command-line argument parser")
+      (description
+       "This library provides a Python module to parse command-line arguments.")
+      (license license:bsd-3))))
 
 (define-public python2-args
   (package-with-python2 python-args))