unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26900: [PATCH] gnu: Enable python-parse-type tests.
@ 2017-05-12 20:05 Danny Milosavljevic
  2017-05-12 20:35 ` bug#26900: [PATCH v2] " Danny Milosavljevic
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Milosavljevic @ 2017-05-12 20:05 UTC (permalink / raw)
  To: 26900

* gnu/packages/python.scm (python-parse-type)[arguments]: Enable tests.
[native-inputs]: Add python-pytest, python-pytest-runner.
[properties]: Add python2-variant.
(python2-parse-type): New variable.
---
 gnu/packages/python.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index dc7adf24e..e32397b59 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1488,13 +1488,25 @@ backported for previous versions of Python from 2.4 to 3.3.")
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-parse" ,python-parse)))
-    (arguments '(#:tests? #f))            ;TODO: tests require pytest
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "https://github.com/jenisys/parse_type")
     (synopsis "Extended parse module")
     (description
      "Parse_type extends the python parse module.")
+    (properties
+     `((python2-variant . ,(delay python2-parse-type))))
     (license license:bsd-3)))
 
+(define-public python2-parse-type
+  (let ((base (package-with-python2
+                (strip-python2-variant python-parse-type))))
+    (package (inherit base)
+      (propagated-inputs
+       `(("python2-enum34" ,python2-enum34)
+         ,@(package-propagated-inputs base))))))
+
 (define-public python-parse
   (package
     (name "python-parse")

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

end of thread, other threads:[~2017-05-12 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12 20:05 bug#26900: [PATCH] gnu: Enable python-parse-type tests Danny Milosavljevic
2017-05-12 20:35 ` bug#26900: [PATCH v2] " Danny Milosavljevic

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