unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28677] [PATCH 0/4] Update python2-unittest2.
@ 2017-10-03  1:19 Cyril Roelandt
  2017-10-03  1:19 ` [bug#28678] [PATCH 1/4] gnu: python-netaddr: Fix the source URL Cyril Roelandt
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Cyril Roelandt @ 2017-10-03  1:19 UTC (permalink / raw)
  To: 28677

This patch series contains all the patches required to build a newer version
python2-unittest2 and its dependencies.

Cyril.

---
Cyril Roelandt (4):
  gnu: python-netaddr: Fix the source URL.
  gnu: Add python-linecache2.
  gnu: Add python-traceback2.
  gnu: python2-unittest2: Update to 1.1.0.

 .../python2-unittest2-remove-argparse.patch        | 11 ++++
 gnu/packages/python.scm                            | 74 ++++++++++++++++++++--
 2 files changed, 79 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/patches/python2-unittest2-remove-argparse.patch

-- 
2.14.1

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

* [bug#28678] [PATCH 1/4] gnu: python-netaddr: Fix the source URL.
  2017-10-03  1:19 [bug#28677] [PATCH 0/4] Update python2-unittest2 Cyril Roelandt
@ 2017-10-03  1:19 ` Cyril Roelandt
  2017-10-03  1:19 ` [bug#28676] [PATCH 2/4] gnu: Add python-linecache2 Cyril Roelandt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Cyril Roelandt @ 2017-10-03  1:19 UTC (permalink / raw)
  To: 28678

* gnu/packages/python.scm (python-netaddr, python2-netaddr): Fix the source URL.
---
 gnu/packages/python.scm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6ffd468b3..904b1e892 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -7519,10 +7519,7 @@ reading and writing MessagePack data.")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
-             version
-             ".tar.gz"))
+       (uri (pypi-uri "netaddr" version))
        (sha256
          (base32
           "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
-- 
2.14.1

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

* [bug#28676] [PATCH 2/4] gnu: Add python-linecache2.
  2017-10-03  1:19 [bug#28677] [PATCH 0/4] Update python2-unittest2 Cyril Roelandt
  2017-10-03  1:19 ` [bug#28678] [PATCH 1/4] gnu: python-netaddr: Fix the source URL Cyril Roelandt
@ 2017-10-03  1:19 ` Cyril Roelandt
  2017-10-03 14:33   ` Leo Famulari
  2017-10-03  1:19 ` [bug#28679] [PATCH 3/4] gnu: Add python-traceback2 Cyril Roelandt
  2017-10-03  1:19 ` [bug#28680] [PATCH 4/4] gnu: python2-unittest2: Update to 1.1.0 Cyril Roelandt
  3 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2017-10-03  1:19 UTC (permalink / raw)
  To: 28676

* gnu/packages/python.scm (python-linecache2, python2-linecache2): New
  variables.
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 904b1e892..f6e395bfc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -16436,3 +16436,32 @@ their files and supports any packaging format (including wheels).")
 
 (define-public python2-twine
   (package-with-python2 python-twine))
+
+(define-public python-linecache2
+  (package
+    (name "python-linecache2")
+    (version "1.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "linecache2" version))
+        (sha256
+          (base32
+            "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; The tests depend on unittest2, and our version is a bit too old.
+       #:tests? #f))
+    (native-inputs
+     `(("python-pbr" ,python-pbr)))
+    (home-page
+      "https://github.com/testing-cabal/linecache2")
+    (synopsis "Backports of the linecache module")
+    (description
+      "The linecache module allows one to get any line from any file, while
+attempting to optimize internally, using a cache, the common case where many
+lines are read from a single file.")
+    (license license:psfl)))
+
+(define-public python2-linecache2
+  (package-with-python2 python-linecache2))
-- 
2.14.1

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

* [bug#28679] [PATCH 3/4] gnu: Add python-traceback2.
  2017-10-03  1:19 [bug#28677] [PATCH 0/4] Update python2-unittest2 Cyril Roelandt
  2017-10-03  1:19 ` [bug#28678] [PATCH 1/4] gnu: python-netaddr: Fix the source URL Cyril Roelandt
  2017-10-03  1:19 ` [bug#28676] [PATCH 2/4] gnu: Add python-linecache2 Cyril Roelandt
@ 2017-10-03  1:19 ` Cyril Roelandt
  2017-10-03  1:19 ` [bug#28680] [PATCH 4/4] gnu: python2-unittest2: Update to 1.1.0 Cyril Roelandt
  3 siblings, 0 replies; 9+ messages in thread
From: Cyril Roelandt @ 2017-10-03  1:19 UTC (permalink / raw)
  To: 28679

* gnu/packages/python.scm (python-traceback2, python2-traceback2): New
  variables.
---
 gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f6e395bfc..e66706086 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -16465,3 +16465,34 @@ lines are read from a single file.")
 
 (define-public python2-linecache2
   (package-with-python2 python-linecache2))
+
+(define-public python-traceback2
+  (package
+    (name "python-traceback2")
+    (version "1.4.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "traceback2" version))
+        (sha256
+          (base32
+            "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; python-traceback2 and python-unittest2 depend on one another.
+       #:tests? #f))
+    (native-inputs
+     `(("python-pbr" ,python-pbr)))
+    (propagated-inputs
+      `(("python-linecache2" ,python-linecache2)))
+    (home-page
+      "https://github.com/testing-cabal/traceback2")
+    (synopsis "Backports of the traceback module")
+    (description
+      "This module provides a standard interface to extract, format and print
+stack traces of Python programs.  It exactly mimics the behavior of the Python
+interpreter when it prints a stack trace.")
+    (license license:psfl)))
+
+(define-public python2-traceback2
+  (package-with-python2 python-traceback2))
-- 
2.14.1

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

* [bug#28680] [PATCH 4/4] gnu: python2-unittest2: Update to 1.1.0.
  2017-10-03  1:19 [bug#28677] [PATCH 0/4] Update python2-unittest2 Cyril Roelandt
                   ` (2 preceding siblings ...)
  2017-10-03  1:19 ` [bug#28679] [PATCH 3/4] gnu: Add python-traceback2 Cyril Roelandt
@ 2017-10-03  1:19 ` Cyril Roelandt
  2017-10-03 14:34   ` Leo Famulari
  3 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2017-10-03  1:19 UTC (permalink / raw)
  To: 28680

* gnu/packages/python.scm (python2-unittest2): Update to 1.1.0.
---
 gnu/packages/patches/python2-unittest2-remove-argparse.patch | 11 +++++++++++
 gnu/packages/python.scm                                      |  9 +++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/python2-unittest2-remove-argparse.patch

diff --git a/gnu/packages/patches/python2-unittest2-remove-argparse.patch b/gnu/packages/patches/python2-unittest2-remove-argparse.patch
new file mode 100644
index 000000000..c96738757
--- /dev/null
+++ b/gnu/packages/patches/python2-unittest2-remove-argparse.patch
@@ -0,0 +1,11 @@
+--- a/setup.py	2017-09-12 01:22:06.273997788 +0200
++++ b/setup.py	2017-09-12 01:22:14.297918757 +0200
+@@ -57,7 +57,7 @@
+ # Both install and setup requires - because we read VERSION from within the
+ # package, and the package also exports all the APIs.
+ # six for compat helpers
+-REQUIRES = ['argparse', 'six>=1.4', 'traceback2'],
++REQUIRES = ['six>=1.4', 'traceback2'],
+ 
+ params = dict(
+     name=NAME,
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e66706086..b45f9bb25 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1843,7 +1843,7 @@ standard library.")
 (define-public python2-unittest2
   (package (inherit python-unittest2)
     (name "python2-unittest2")
-    (version "0.5.1")
+    (version "1.1.0")
     (source
      (origin
        (method url-fetch)
@@ -1852,7 +1852,12 @@ standard library.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
+         "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))
+       (patches
+        (search-patches "python2-unittest2-remove-argparse.patch"))))
+    (propagated-inputs
+     `(("python2-six" ,python2-six)
+       ("python2-traceback2" ,python2-traceback2)))
     (arguments
      `(#:python ,python-2
        #:tests? #f)))) ; no setup.py test command
-- 
2.14.1

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

* [bug#28676] [PATCH 2/4] gnu: Add python-linecache2.
  2017-10-03  1:19 ` [bug#28676] [PATCH 2/4] gnu: Add python-linecache2 Cyril Roelandt
@ 2017-10-03 14:33   ` Leo Famulari
  2017-10-08  3:48     ` Cyril Roelandt
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2017-10-03 14:33 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28676

On Tue, Oct 03, 2017 at 03:19:11AM +0200, Cyril Roelandt wrote:
> * gnu/packages/python.scm (python-linecache2, python2-linecache2): New
>   variables.

> +    (synopsis "Backports of the linecache module")
> +    (description
> +      "The linecache module allows one to get any line from any file, while
> +attempting to optimize internally, using a cache, the common case where many
> +lines are read from a single file.")

Can you add the details of what this is ported from, and what it's
ported to? That will make it easier to know when we can remove it later
on, once everything is updated. And the same for the other backport
package.

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

* [bug#28680] [PATCH 4/4] gnu: python2-unittest2: Update to 1.1.0.
  2017-10-03  1:19 ` [bug#28680] [PATCH 4/4] gnu: python2-unittest2: Update to 1.1.0 Cyril Roelandt
@ 2017-10-03 14:34   ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2017-10-03 14:34 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28680

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

On Tue, Oct 03, 2017 at 03:19:13AM +0200, Cyril Roelandt wrote:
> * gnu/packages/python.scm (python2-unittest2): Update to 1.1.0.
> ---
>  gnu/packages/patches/python2-unittest2-remove-argparse.patch | 11 +++++++++++
>  gnu/packages/python.scm                                      |  9 +++++++--

Remember to add the patch to 'gnu/local.mk' and mention it in the commit
message. Otherwise LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#28676] [PATCH 2/4] gnu: Add python-linecache2.
  2017-10-03 14:33   ` Leo Famulari
@ 2017-10-08  3:48     ` Cyril Roelandt
  2017-10-09 19:47       ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2017-10-08  3:48 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 28676

On 10/03/2017 04:33 PM, Leo Famulari wrote:
> Can you add the details of what this is ported from, and what it's
> ported to? That will make it easier to know when we can remove it later
> on, once everything is updated. And the same for the other backport
> package.

So, both linecache2 and traceback2 are quite poorly documented in this
regard. They seem to be backports of linecache and traceback from Python
3 to Python 2.x, but both these modules existed in Python 2.x, so I'm
not exactly sure of what they do.

To be honest, I do not think anybody uses them in real life: they seem
to only be needed by unittest2 (which was written by the same author).
If it's OK with you, I'd rather leave the description as is, rather than
guessing. WDYT?


Cyril.

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

* [bug#28676] [PATCH 2/4] gnu: Add python-linecache2.
  2017-10-08  3:48     ` Cyril Roelandt
@ 2017-10-09 19:47       ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2017-10-09 19:47 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28676

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

On Sun, Oct 08, 2017 at 05:48:54AM +0200, Cyril Roelandt wrote:
> On 10/03/2017 04:33 PM, Leo Famulari wrote:
> > Can you add the details of what this is ported from, and what it's
> > ported to? That will make it easier to know when we can remove it later
> > on, once everything is updated. And the same for the other backport
> > package.
> 
> So, both linecache2 and traceback2 are quite poorly documented in this
> regard. They seem to be backports of linecache and traceback from Python
> 3 to Python 2.x, but both these modules existed in Python 2.x, so I'm
> not exactly sure of what they do.
> 
> To be honest, I do not think anybody uses them in real life: they seem
> to only be needed by unittest2 (which was written by the same author).
> If it's OK with you, I'd rather leave the description as is, rather than
> guessing. WDYT?

Okay, sounds good to me :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-10-09 19:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03  1:19 [bug#28677] [PATCH 0/4] Update python2-unittest2 Cyril Roelandt
2017-10-03  1:19 ` [bug#28678] [PATCH 1/4] gnu: python-netaddr: Fix the source URL Cyril Roelandt
2017-10-03  1:19 ` [bug#28676] [PATCH 2/4] gnu: Add python-linecache2 Cyril Roelandt
2017-10-03 14:33   ` Leo Famulari
2017-10-08  3:48     ` Cyril Roelandt
2017-10-09 19:47       ` Leo Famulari
2017-10-03  1:19 ` [bug#28679] [PATCH 3/4] gnu: Add python-traceback2 Cyril Roelandt
2017-10-03  1:19 ` [bug#28680] [PATCH 4/4] gnu: python2-unittest2: Update to 1.1.0 Cyril Roelandt
2017-10-03 14:34   ` Leo Famulari

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