unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
@ 2017-07-03  3:47 Muriithi Frederick Muriuki
  2017-07-11 19:21 ` Marius Bakke
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Muriithi Frederick Muriuki @ 2017-07-03  3:47 UTC (permalink / raw)
  To: 27558

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3e71a23bc..1ad5b146e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -15512,3 +15512,35 @@ pure Python module.")
 
 (define-public python2-rencode
   (package-with-python2 python-rencode))
+
+(define-public python-ruamel.yaml
+  (package
+    (name "python-ruamel.yaml")
+    (version "0.15.16")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ruamel.yaml" version))
+       (sha256
+        (base32
+         "0yx1a1yqgm1phrmyvqzag5jwivn25ndlnwh2mgwgr7m8skn2h045"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; Tests fail with message:
+       ;; ImportError: Failed to import test module: .ruamel
+       ;; but the directory .ruamel exists in the environment
+       ;; left when the package is built with --keep-failed
+       #:tests? #f))
+    (home-page "https://bitbucket.org/ruamel/yaml")
+    (synopsis
+     "A YAML 1.2 parser/emitter")
+    (description
+     "This package provides YAML parser/emitter that supports roundtrip
+preservation of comments, seq/map flow style, and map key order.  It
+is a derivative of Kirill Simonov’s PyYAML 3.11.  It supports YAML 1.2
+and has round-trip loaders and dumpers. It supports comments. Block
+style and key ordering are kept, so you can diff the source.")
+    (license license:expat)))
+
+(define-public python2-ruamel.yaml
+  (package-with-python2 python-ruamel.yaml))
-- 
2.13.2

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-03  3:47 [bug#27558] [PATCH] gnu: Add python-ruamel.yaml Muriithi Frederick Muriuki
@ 2017-07-11 19:21 ` Marius Bakke
  2017-07-11 23:17 ` Muriithi Frederick Muriuki
  2017-07-14 13:22 ` Muriithi Frederick Muriuki
  2 siblings, 0 replies; 8+ messages in thread
From: Marius Bakke @ 2017-07-11 19:21 UTC (permalink / raw)
  To: Muriithi Frederick Muriuki, 27558

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

Muriithi Frederick Muriuki <fredmanglis@gmail.com> writes:

> * gnu/packages/python.scm (python-ruamel.yaml, python2-ruamel.yaml):
>   New variables.

[...]

> +(define-public python-ruamel.yaml
> +  (package
> +    (name "python-ruamel.yaml")
> +    (version "0.15.16")

0.15.18 is out already, sorry for the slow review! Can you try updating
to it?

> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "ruamel.yaml" version))
> +       (sha256
> +        (base32
> +         "0yx1a1yqgm1phrmyvqzag5jwivn25ndlnwh2mgwgr7m8skn2h045"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(;; Tests fail with message:
> +       ;; ImportError: Failed to import test module: .ruamel
> +       ;; but the directory .ruamel exists in the environment
> +       ;; left when the package is built with --keep-failed
> +       #:tests? #f))

'python setup.py test' does not work for all packages and may return
bogus errors like these. Often you can find hints for how upstream runs
their tests in "tox.ini", or CI configuration files like ".travis.yml".

tox.ini in this case runs "bash -c 'pytest _test/test_*.py'". Can you
try replacing the check phase with a phase that invokes this command?

Apart from that looks good!

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

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-03  3:47 [bug#27558] [PATCH] gnu: Add python-ruamel.yaml Muriithi Frederick Muriuki
  2017-07-11 19:21 ` Marius Bakke
@ 2017-07-11 23:17 ` Muriithi Frederick Muriuki
  2017-07-13 19:47   ` Marius Bakke
  2017-07-14 13:22 ` Muriithi Frederick Muriuki
  2 siblings, 1 reply; 8+ messages in thread
From: Muriithi Frederick Muriuki @ 2017-07-11 23:17 UTC (permalink / raw)
  To: 27558

* gnu/packages/python.scm (python-ruamel.yaml, python2-ruamel.yaml) New
* variables.
---
 gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d110a1cb3..161812ac9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -15549,3 +15549,35 @@ pure Python module.")
 
 (define-public python2-rencode
   (package-with-python2 python-rencode))
+
+(define-public python-ruamel.yaml
+  (package
+    (name "python-ruamel.yaml")
+    (version "0.15.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ruamel.yaml" version))
+       (sha256
+        (base32
+         "1mg8zgc2f45fh7hfy2hdfb8cxq503jqjb7v1gzd9am4bqgkrqp1l"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* _
+             (zero? (system* "bash" "-c" "py.test" "_test/test_*.py")))))))
+    (home-page "https://bitbucket.org/ruamel/yaml")
+    (synopsis "This is a YAML 1.2 parser/emitter")
+    (description "This package provides YAML parser/emitter that supports
+roundtrip preservation of comments, seq/map flow style, and map key order.  It
+is a derivative of Kirill Simonov’s PyYAML 3.11.  It supports YAML 1.2 and has
+round-trip loaders and dumpers.  It supports comments.  Block style and key
+ordering are kept, so you can diff the source.")
+    (license license:expat)))
+
+(define-public python2-ruamel.yaml
+  (package-with-python2 python-ruamel.yaml))
-- 
2.13.2

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-11 23:17 ` Muriithi Frederick Muriuki
@ 2017-07-13 19:47   ` Marius Bakke
  2017-07-13 19:53     ` Frederick Muriithi
  0 siblings, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2017-07-13 19:47 UTC (permalink / raw)
  To: Muriithi Frederick Muriuki, 27558

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

Muriithi Frederick Muriuki <fredmanglis@gmail.com> writes:

> * gnu/packages/python.scm (python-ruamel.yaml, python2-ruamel.yaml) New
> * variables.

Ugh, I'm afraid I have to bother you one more time on this one!

First, we're trying to reduce the amount of packages in python.scm. So I
think we should add it to "serialization.scm" instead, sorry for missing
that the first time around.

> +         (replace 'check
> +           (lambda* _
> +             (zero? (system* "bash" "-c" "py.test" "_test/test_*.py")))))))

This prints "collected 0 items...", which indicates it doesn't actually
run any tests. Looking closer, it seems tests are missing altogether
from the PyPi archive. Could you try downloading the tarball straight
from BitBucket instead?

> +    (home-page "https://bitbucket.org/ruamel/yaml")
> +    (synopsis "This is a YAML 1.2 parser/emitter")

s/This is a //

Again, sorry for the slow and incomplete feedback. I can try to do this
last improvement over the weekend if you're already tired of this patch.

Thanks for your contribution and patience! :-)

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

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-13 19:47   ` Marius Bakke
@ 2017-07-13 19:53     ` Frederick Muriithi
  0 siblings, 0 replies; 8+ messages in thread
From: Frederick Muriithi @ 2017-07-13 19:53 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27558

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

Okay. I'll try and fix that and send you the patch.

[-- Attachment #2: Type: text/html, Size: 78 bytes --]

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-03  3:47 [bug#27558] [PATCH] gnu: Add python-ruamel.yaml Muriithi Frederick Muriuki
  2017-07-11 19:21 ` Marius Bakke
  2017-07-11 23:17 ` Muriithi Frederick Muriuki
@ 2017-07-14 13:22 ` Muriithi Frederick Muriuki
  2017-07-16 20:38   ` Marius Bakke
  2 siblings, 1 reply; 8+ messages in thread
From: Muriithi Frederick Muriuki @ 2017-07-14 13:22 UTC (permalink / raw)
  To: 27558

* gnu/packages/serialization.scm (python-ruamel.yaml, python-ruamel2.yaml):
* New variables.
* Use module (guix build-system python)
---
 gnu/packages/serialization.scm | 43 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 6b7461e62..dc030758b 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -38,7 +38,8 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages perl))
+  #:use-module (gnu packages perl)
+  #:use-module (guix build-system python))
 
 (define-public cereal
   (package
@@ -351,3 +352,43 @@ it is comparable to protobuf.")
 “Trivial integration”, and “Serious testing”.
 However, “Memory efficiency” and “Speed” have not been primary goals.")
     (license license:expat)))
+
+(define-public python-ruamel.yaml
+  (package
+    (name "python-ruamel.yaml")
+    (version "0.15.19")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ruamel.yaml" version))
+       (sha256
+        (base32
+         "0qx779avw8d1vsjqyi7z21h1g5ykp8paqavgj0lzbp8h7bw9vpgv"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (arguments
+     `(;; The 'check phase defined below seems to be correct, but the code on
+       ;; pypi comes with no tests, and the code fetched directly from
+       ;; bitbucket (https://bitbucket.org/ruamel/yaml/get/<version>.tar.gz)
+       ;; fails the tests with "ImportError: No module named 'ruamel.yaml'"
+       ;; or "ImportError: No module named 'ruamel'".
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero? (system* "bash" "-c" "py.test" "_test/test_*.py")))))
+       #:tests? #f))
+    (home-page "https://bitbucket.org/ruamel/yaml")
+    (synopsis
+     "A YAML 1.2 parser/emitter")
+    (description
+     "This package provides YAML parser/emitter that supports roundtrip
+preservation of comments, seq/map flow style, and map key order.  It
+is a derivative of Kirill Simonov’s PyYAML 3.11.  It supports YAML 1.2
+and has round-trip loaders and dumpers. It supports comments. Block
+style and key ordering are kept, so you can diff the source.")
+    (license license:expat)))
+
+(define-public python2-ruamel.yaml
+  (package-with-python2 python-ruamel.yaml))
-- 
2.13.2

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-14 13:22 ` Muriithi Frederick Muriuki
@ 2017-07-16 20:38   ` Marius Bakke
  2017-07-16 20:39     ` Frederick Muriithi
  0 siblings, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2017-07-16 20:38 UTC (permalink / raw)
  To: Muriithi Frederick Muriuki, 27558

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

Muriithi Frederick Muriuki <fredmanglis@gmail.com> writes:

> * gnu/packages/serialization.scm (python-ruamel.yaml, python-ruamel2.yaml):
> * New variables.
> * Use module (guix build-system python)

[...]

> +    (arguments
> +     `(;; The 'check phase defined below seems to be correct, but the code on
> +       ;; pypi comes with no tests, and the code fetched directly from
> +       ;; bitbucket (https://bitbucket.org/ruamel/yaml/get/<version>.tar.gz)
> +       ;; fails the tests with "ImportError: No module named 'ruamel.yaml'"
> +       ;; or "ImportError: No module named 'ruamel'".

I looked into this, and it requires an additional library
"ruamel.std.pathlib" for tests. It would be great to have it, but I've
applied this for now with minor cosmetics fixes to make `guix lint`
happy. Also added a copyright line for you.

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

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

* [bug#27558] [PATCH] gnu: Add python-ruamel.yaml
  2017-07-16 20:38   ` Marius Bakke
@ 2017-07-16 20:39     ` Frederick Muriithi
  0 siblings, 0 replies; 8+ messages in thread
From: Frederick Muriithi @ 2017-07-16 20:39 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27558

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

Awesome, thanks!

[-- Attachment #2: Type: text/html, Size: 123 bytes --]

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

end of thread, other threads:[~2017-07-16 20:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03  3:47 [bug#27558] [PATCH] gnu: Add python-ruamel.yaml Muriithi Frederick Muriuki
2017-07-11 19:21 ` Marius Bakke
2017-07-11 23:17 ` Muriithi Frederick Muriuki
2017-07-13 19:47   ` Marius Bakke
2017-07-13 19:53     ` Frederick Muriithi
2017-07-14 13:22 ` Muriithi Frederick Muriuki
2017-07-16 20:38   ` Marius Bakke
2017-07-16 20:39     ` Frederick Muriithi

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