unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring.
@ 2022-01-06 10:21 Tanguy Le Carrour
  2022-01-09 21:15 ` Maxime Devos
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Tanguy Le Carrour @ 2022-01-06 10:21 UTC (permalink / raw)
  To: 53046; +Cc: Tanguy Le Carrour

This fixes a build failure in the 'sanity-check' phase.

* gnu/packages/python-xyz.scm (python-args)[arguments]:
Replace reference to basestring with str.
---
 gnu/packages/python-xyz.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c9a0b7d6bf..0d9bfb1711 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13013,6 +13013,14 @@ (define-public python-args
                (base32
                 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-args.py
+           (lambda _
+             (substitute* "args.py"
+               (("basestring") "str"))
+             #t)))))
     (home-page "https://github.com/kennethreitz/args")
     (synopsis "Command-line argument parser")
     (description
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring.
  2022-01-06 10:21 [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring Tanguy Le Carrour
@ 2022-01-09 21:15 ` Maxime Devos
  2022-01-09 21:34   ` Maxime Devos
  2022-01-10  7:46   ` Tanguy LE CARROUR
  2022-01-17 13:34 ` [bug#53046] [PATCH v2] gnu: " Tanguy Le Carrour
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 12+ messages in thread
From: Maxime Devos @ 2022-01-09 21:15 UTC (permalink / raw)
  To: tanguy; +Cc: 53046

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

> This fixes a build failure in the 'sanity-check' phase.
> +             (substitute* "args.py"
> +               (("basestring") "str"))

Does it actually fix the build failure, or is it only suppressed?

Looking at

<https://github.com/kennethreitz-archive/args/blob/master/args.py>,
line 15--18, it appears that basestring should actually be basestring,
at least for Python 2 (python2-args).

Also, returning #true isn't necessary anymore, and this seems better
fit for a snippet.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring.
  2022-01-09 21:15 ` Maxime Devos
@ 2022-01-09 21:34   ` Maxime Devos
  2022-01-10  7:48     ` Tanguy LE CARROUR
  2022-01-10  7:46   ` Tanguy LE CARROUR
  1 sibling, 1 reply; 12+ messages in thread
From: Maxime Devos @ 2022-01-09 21:34 UTC (permalink / raw)
  To: tanguy; +Cc: 53046

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Maxime Devos schreef op zo 09-01-2022 om 22:15 [+0100]:
> > This fixes a build failure in the 'sanity-check' phase.
> > +             (substitute* "args.py"
> > +               (("basestring") "str"))
> 
> Does it actually fix the build failure, or is it only suppressed?
> [...]

According to <https://github.com/kennethreitz-archive/args/pull/19>,
the tests are excluded from the tarball.  It would be useful to
switch to git-fetch such that tests can be run, verifying whether
this change causes problems or not.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring.
  2022-01-09 21:15 ` Maxime Devos
  2022-01-09 21:34   ` Maxime Devos
@ 2022-01-10  7:46   ` Tanguy LE CARROUR
  1 sibling, 0 replies; 12+ messages in thread
From: Tanguy LE CARROUR @ 2022-01-10  7:46 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53046

Hi Maxime,


Quoting Maxime Devos (2022-01-09 22:15:41)
> > This fixes a build failure in the 'sanity-check' phase.
> > +             (substitute* "args.py"
> > +               (("basestring") "str"))
> 
> Does it actually fix the build failure, or is it only suppressed?
> 
> Looking at
> 
> <https://github.com/kennethreitz-archive/args/blob/master/args.py>,
> line 15--18, it appears that basestring should actually be basestring,
> at least for Python 2 (python2-args).

Believe it or not, I had totally forgotten about Python 2 when I wrote
that! ^_^'


> Also, returning #true isn't necessary anymore, and this seems better
> fit for a snippet.

OK, I'll fix it.

Thanks for reviewing,

-- 
Tanguy




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring.
  2022-01-09 21:34   ` Maxime Devos
@ 2022-01-10  7:48     ` Tanguy LE CARROUR
  0 siblings, 0 replies; 12+ messages in thread
From: Tanguy LE CARROUR @ 2022-01-10  7:48 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53046

Hi Maxime,


Quoting Maxime Devos (2022-01-09 22:34:52)
> Maxime Devos schreef op zo 09-01-2022 om 22:15 [+0100]:
> > > This fixes a build failure in the 'sanity-check' phase.
> > > +             (substitute* "args.py"
> > > +               (("basestring") "str"))
> > 
> > Does it actually fix the build failure, or is it only suppressed?
> > [...]
> 
> According to <https://github.com/kennethreitz-archive/args/pull/19>,
> the tests are excluded from the tarball.  It would be useful to
> switch to git-fetch such that tests can be run, verifying whether
> this change causes problems or not.

I'll switch to `git-fetch` and see! Maybe Python 2 tests will also pass
with the patch!?

I'll apply all your suggestions and send a v2.

Thanks again for your time and advice.

-- 
Tanguy




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH v2] gnu: Patch reference to basestring.
  2022-01-06 10:21 [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring Tanguy Le Carrour
  2022-01-09 21:15 ` Maxime Devos
@ 2022-01-17 13:34 ` Tanguy Le Carrour
  2022-01-17 14:14   ` Maxime Devos
  2022-01-17 14:23 ` [bug#53046] [PATCH v3] " Tanguy Le Carrour
  2022-03-10 17:28 ` [bug#53046] [PATCH v4] gnu: python-args: " Tanguy Le Carrour
  3 siblings, 1 reply; 12+ messages in thread
From: Tanguy Le Carrour @ 2022-01-17 13:34 UTC (permalink / raw)
  To: 53046; +Cc: Tanguy Le Carrour, maximedevos

* 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(-)

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))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH v2] gnu: Patch reference to basestring.
  2022-01-17 13:34 ` [bug#53046] [PATCH v2] gnu: " Tanguy Le Carrour
@ 2022-01-17 14:14   ` Maxime Devos
  2022-01-17 14:22     ` Tanguy LE CARROUR
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Devos @ 2022-01-17 14:14 UTC (permalink / raw)
  To: Tanguy Le Carrour, 53046

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH v2] gnu: Patch reference to basestring.
  2022-01-17 14:14   ` Maxime Devos
@ 2022-01-17 14:22     ` Tanguy LE CARROUR
  0 siblings, 0 replies; 12+ messages in thread
From: Tanguy LE CARROUR @ 2022-01-17 14:22 UTC (permalink / raw)
  To: 53046, Maxime Devos

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.


-- 
Tanguy




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH v3] gnu: Patch reference to basestring.
  2022-01-06 10:21 [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring Tanguy Le Carrour
  2022-01-09 21:15 ` Maxime Devos
  2022-01-17 13:34 ` [bug#53046] [PATCH v2] gnu: " Tanguy Le Carrour
@ 2022-01-17 14:23 ` Tanguy Le Carrour
  2022-03-10 17:28 ` [bug#53046] [PATCH v4] gnu: python-args: " Tanguy Le Carrour
  3 siblings, 0 replies; 12+ messages in thread
From: Tanguy Le Carrour @ 2022-01-17 14:23 UTC (permalink / raw)
  To: 53046; +Cc: Tanguy Le Carrour, maximedevos

* 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 | 45 ++++++++++++++++++++++++-------------
 1 file changed, 30 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 80ce58400a..3b35cb2cba 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13368,21 +13368,36 @@ (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* (#:key tests? #:allow-other-keys)
+                        (when tests?
+                          (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))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH v4] gnu: python-args: Patch reference to basestring.
  2022-01-06 10:21 [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring Tanguy Le Carrour
                   ` (2 preceding siblings ...)
  2022-01-17 14:23 ` [bug#53046] [PATCH v3] " Tanguy Le Carrour
@ 2022-03-10 17:28 ` Tanguy Le Carrour
  2022-08-04  9:09   ` bug#53046: [PATCH] " Ludovic Courtès
  3 siblings, 1 reply; 12+ messages in thread
From: Tanguy Le Carrour @ 2022-03-10 17:28 UTC (permalink / raw)
  To: 53046, maximedevos; +Cc: Tanguy Le Carrour

Hi Maxime,

I **totally** forgot about this one! Seems like no one is using it.
`python2-args` also builds. But no package seems to depend on it anyway.

Regards,

Tanguy


* gnu/packages/python-xyz.scm (python-args)[source]: Use the latest version
from the git repository to get the test suite.
[home-page]: Update URL.
[native-inputs]: Add python-nose.
[arguments]: Replace reference to basestring with str. Invoke nosetests.
---
 gnu/packages/python-xyz.scm | 45 ++++++++++++++++++++++++-------------
 1 file changed, 30 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5c003e3c1a..b8798fa671 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13638,21 +13638,36 @@ (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-archive/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* (#:key tests? #:allow-other-keys)
+                        (when tests?
+                          (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))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* bug#53046: [PATCH] gnu: python-args: Patch reference to basestring.
  2022-03-10 17:28 ` [bug#53046] [PATCH v4] gnu: python-args: " Tanguy Le Carrour
@ 2022-08-04  9:09   ` Ludovic Courtès
  2022-08-04  9:42     ` [bug#53046] " Tanguy LE CARROUR
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2022-08-04  9:09 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: 53046-done, maximedevos

Hi Tanguy,

Tanguy Le Carrour <tanguy@bioneland.org> skribis:

> * gnu/packages/python-xyz.scm (python-args)[source]: Use the latest version
> from the git repository to get the test suite.
> [home-page]: Update URL.
> [native-inputs]: Add python-nose.
> [arguments]: Replace reference to basestring with str. Invoke nosetests.

Finally applied, sorry for the delay, and thanks for reminding us!  :-)

Ludo’.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring.
  2022-08-04  9:09   ` bug#53046: [PATCH] " Ludovic Courtès
@ 2022-08-04  9:42     ` Tanguy LE CARROUR
  0 siblings, 0 replies; 12+ messages in thread
From: Tanguy LE CARROUR @ 2022-08-04  9:42 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 53046-done, maximedevos

Hi Ludo’,


Quoting Ludovic Courtès (2022-08-04 11:09:39)
> Tanguy Le Carrour <tanguy@bioneland.org> skribis:
> 
> > * gnu/packages/python-xyz.scm (python-args)[source]: Use the latest version
> > from the git repository to get the test suite.
> > [home-page]: Update URL.
> > [native-inputs]: Add python-nose.
> > [arguments]: Replace reference to basestring with str. Invoke nosetests.
> 
> Finally applied, sorry for the delay, and thanks for reminding us!  :-)

Thanks!

-- 
Tanguy




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-04  9:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 10:21 [bug#53046] [PATCH] gnu: python-args: Patch reference to basestring Tanguy Le Carrour
2022-01-09 21:15 ` Maxime Devos
2022-01-09 21:34   ` Maxime Devos
2022-01-10  7:48     ` Tanguy LE CARROUR
2022-01-10  7:46   ` Tanguy LE CARROUR
2022-01-17 13:34 ` [bug#53046] [PATCH v2] gnu: " Tanguy Le Carrour
2022-01-17 14:14   ` Maxime Devos
2022-01-17 14:22     ` Tanguy LE CARROUR
2022-01-17 14:23 ` [bug#53046] [PATCH v3] " Tanguy Le Carrour
2022-03-10 17:28 ` [bug#53046] [PATCH v4] gnu: python-args: " Tanguy Le Carrour
2022-08-04  9:09   ` bug#53046: [PATCH] " Ludovic Courtès
2022-08-04  9:42     ` [bug#53046] " Tanguy LE CARROUR

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).