all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive.
@ 2017-07-15  7:19 Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27701] [PATCH 1/4] gnu: Add python-schema Oleg Pykhalov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-07-15  7:19 UTC (permalink / raw)
  To: 27699

Oleg Pykhalov (4):
  gnu: Add python-schema.
  gnu: Add python-backports-csv.
  gnu: Add python-jsonpatch.
  gnu: Add python-internetarchive.

 gnu/packages/python.scm | 107 ++++++++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/web.scm    |  42 +++++++++++++++++++
 2 files changed, 149 insertions(+)

-- 
2.13.2

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

* [bug#27701] [PATCH 1/4] gnu: Add python-schema.
  2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
@ 2017-07-15  7:19 ` Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27700] [PATCH 2/4] gnu: Add python-backports-csv Oleg Pykhalov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-07-15  7:19 UTC (permalink / raw)
  To: 27701

* gnu/packages/python.scm (python-schema): New variable.
---
 gnu/packages/python.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d110a1cb3..f4b562ab9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2711,6 +2711,46 @@ version numbers.")
              (propagated-inputs
               `(("python2-functools32" ,python2-functools32))))))
 
+(define-public python-schema
+  (package
+    (name "python-schema")
+    (version "0.6.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "schema" version))
+       (sha256
+	(base32
+	 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/keleshev/schema")
+    (synopsis "Simple data validation library")
+    (description
+     "@code{python-schema} is a library for validating Python data
+structures, such as those obtained from config-files, forms, external
+services or command-line parsing, converted from JSON/YAML (or
+something else) to Python data-types.")
+    (license license:psfl)))
+
+(define-public python2-schema
+  (package-with-python2 python-schema))
+
+(define-public python-schema-0.5
+  (package (inherit python-schema)
+    (version "0.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "schema" version))
+       (sha256
+	(base32
+	 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
+
+(define-public python2-schema-0.5
+  (package-with-python2 python-schema-0.5))
+
 (define-public python-kitchen
   (package
     (name "python-kitchen")
-- 
2.13.2

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

* [bug#27700] [PATCH 2/4] gnu: Add python-backports-csv.
  2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27701] [PATCH 1/4] gnu: Add python-schema Oleg Pykhalov
@ 2017-07-15  7:19 ` Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27702] [PATCH 3/4] gnu: Add python-jsonpatch Oleg Pykhalov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-07-15  7:19 UTC (permalink / raw)
  To: 27700

* gnu/packages/python.scm (python-backports-csv): New variable.
---
 gnu/packages/python.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f4b562ab9..79d58f8d3 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6373,6 +6373,29 @@ connection to each user.")
 (define-public python2-backports-abc
   (package-with-python2 python-backports-abc))
 
+(define-public python-backports-csv
+  (package
+    (name "python-backports-csv")
+    (version "1.0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "backports.csv" version))
+       (sha256
+	(base32
+	 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/ryanhiebert/backports.csv")
+    (synopsis "Backport of Python 3's csv module for Python 2")
+    (description
+     "The API of the csv module in Python 2 is drastically different from
+the csv module in Python 3.  This is due, for the most part, to the
+difference between str in Python 2 and Python 3.")
+    (license license:psfl)))
+
+(define-public python2-backports-csv
+  (package-with-python2 python-backports-csv))
+
 (define-public python2-backports-shutil-get-terminal-size
   (package
     (name "python2-backports-shutil-get-terminal-size")
-- 
2.13.2

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

* [bug#27702] [PATCH 3/4] gnu: Add python-jsonpatch.
  2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27701] [PATCH 1/4] gnu: Add python-schema Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27700] [PATCH 2/4] gnu: Add python-backports-csv Oleg Pykhalov
@ 2017-07-15  7:19 ` Oleg Pykhalov
  2017-07-15  7:19 ` [bug#27703] [PATCH 4/4] gnu: Add python-internetarchive Oleg Pykhalov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-07-15  7:19 UTC (permalink / raw)
  To: 27702

* gnu/packages/python.scm (python-jsonpatch): New variable.
---
 gnu/packages/python.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 79d58f8d3..9bf1cde12 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -15236,6 +15236,50 @@ by path in a JSON document (see RFC 6901).")
 (define-public python2-jsonpointer
   (package-with-python2 python-jsonpointer))
 
+(define-public python-jsonpatch
+  (package
+    (name "python-jsonpatch")
+    (version "1.16")
+    (source
+     (origin
+       (method url-fetch)
+       ;; pypi version lucks tests.js
+       (uri (string-append
+	     "https://github.com/stefankoegl/python-json-patch/archive/v"
+	     version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-jsonpointer" ,python-jsonpointer)))
+    (home-page "https://github.com/stefankoegl/python-json-patch")
+    (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
+    (description "Library to apply JSON Patches according to RFC 6902")
+    (license license:bsd-3)))
+
+(define-public python2-jsonpatch
+  (package-with-python2 python-jsonpatch))
+
+(define-public python-jsonpatch-0.4
+  (package (inherit python-jsonpatch)
+	   (name "python-jsonpatch")
+	   (version "0.4")
+	   (source
+	    (origin
+	      (method url-fetch)
+	      (uri (string-append
+		    "https://github.com/stefankoegl/python-json-patch/archive/v"
+		    version ".tar.gz"))
+	      (file-name (string-append name "-" version ".tar.gz"))
+	      (sha256
+	       (base32
+		"0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
+
+(define-public python2-jsonpatch-0.4
+  (package-with-python2 python-jsonpatch-0.4))
+
 (define-public python-rfc3987
   (package
     (name "python-rfc3987")
-- 
2.13.2

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

* [bug#27703] [PATCH 4/4] gnu: Add python-internetarchive.
  2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
                   ` (2 preceding siblings ...)
  2017-07-15  7:19 ` [bug#27702] [PATCH 3/4] gnu: Add python-jsonpatch Oleg Pykhalov
@ 2017-07-15  7:19 ` Oleg Pykhalov
  2017-07-15  7:26 ` [bug#27699] Splitted accross several bugs reports Oleg Pykhalov
  2017-07-15 10:05 ` [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Danny Milosavljevic
  5 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-07-15  7:19 UTC (permalink / raw)
  To: 27703

Is it a good idea to leave python-pytest as dependency in
python2-internetarchive (inside ,@(package-propagated-inputs
internetarchive))?  If not, what is good way to avoid this?

* gnu/packages/python.scm (python-internetarchive): New variable.
---
 gnu/packages/web.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 802990354..162a89455 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4695,3 +4695,45 @@ arrays.  It creates a JSON string on stdout from words provided as
 command-line arguments or read from stdin.")
     (license (list l:gpl2+
                    l:expat)))) ; json.c, json.h
+
+(define-public python-internetarchive
+  (package
+    (name "python-internetarchive")
+    (version "1.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+	     "https://github.com/jjjake/internetarchive/archive/v"
+	     version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "00v1489rv1ydcihwbdl7sqpcpmm98b9kqqlfggr32k0ndmv7ivas"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-requests" ,python-requests)
+       ("python-jsonpatch" ,python-jsonpatch-0.4)
+       ("python-docopt" ,python-docopt)
+       ("python-clint" ,python-clint)
+       ("python-six" ,python-six)
+       ("python-schema" ,python-schema-0.5)
+       ("python-backports-csv" ,python-backports-csv)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-responses" ,python-responses)))
+    (home-page "https://github.com/jjjake/internetarchive")
+    (synopsis "Command-line interface to archive.org")
+    (description "@code{ia} is a command-line tool for using
+@url{archive.org} from the command-line.  It also emplements the
+internetarchive python module for programatic access to archive.org.")
+    (license l:agpl3+)))
+
+(define-public python2-internetarchive
+  (let ((internetarchive (package-with-python2 (strip-python2-variant python-internetarchive))))
+    (package (inherit internetarchive)
+      (propagated-inputs
+       `(("python2-pytest"
+          ,python2-pytest)
+          ,@(package-propagated-inputs internetarchive))))))
+
-- 
2.13.2

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

* [bug#27699] Splitted accross several bugs reports.
  2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
                   ` (3 preceding siblings ...)
  2017-07-15  7:19 ` [bug#27703] [PATCH 4/4] gnu: Add python-internetarchive Oleg Pykhalov
@ 2017-07-15  7:26 ` Oleg Pykhalov
  2017-07-15 10:05 ` [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Danny Milosavljevic
  5 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-07-15  7:26 UTC (permalink / raw)
  To: 27699

Oh, sorry, it was splitted accross several bugs reports.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27699
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27701
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27700
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27702
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27703

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

* [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive.
  2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
                   ` (4 preceding siblings ...)
  2017-07-15  7:26 ` [bug#27699] Splitted accross several bugs reports Oleg Pykhalov
@ 2017-07-15 10:05 ` Danny Milosavljevic
  5 siblings, 0 replies; 7+ messages in thread
From: Danny Milosavljevic @ 2017-07-15 10:05 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 27699

Hi,

thanks! I removed the Tab characters, fixed some of the python-internetarchive tests and fixed python2-internetarchive and updated the commit messages to mention *all* the variables added.

Why did you propagate python2-pytest ? The Python3 tests didn't work either, the problem was not related to propagated-inputs...

After I fixed up the test invocation, still 11 tests of 105 fail, apparently mostly because the Requests mock doesn't work.  Could you take a look?

The mocking is done in tests/conftest.py in internetarchive-1.6.0.

I've disabled the test suite for the time being and pushed to master.

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

end of thread, other threads:[~2017-07-15 10:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-15  7:19 [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Oleg Pykhalov
2017-07-15  7:19 ` [bug#27701] [PATCH 1/4] gnu: Add python-schema Oleg Pykhalov
2017-07-15  7:19 ` [bug#27700] [PATCH 2/4] gnu: Add python-backports-csv Oleg Pykhalov
2017-07-15  7:19 ` [bug#27702] [PATCH 3/4] gnu: Add python-jsonpatch Oleg Pykhalov
2017-07-15  7:19 ` [bug#27703] [PATCH 4/4] gnu: Add python-internetarchive Oleg Pykhalov
2017-07-15  7:26 ` [bug#27699] Splitted accross several bugs reports Oleg Pykhalov
2017-07-15 10:05 ` [bug#27699] [PATCH 0/4] gnu: Add python-internetarchive Danny Milosavljevic

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.