guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/37: gnu: python-testresources: Update to 2.0.1.


From: Marius Bakke
Subject: 03/37: gnu: python-testresources: Update to 2.0.1.
Date: Wed, 28 Feb 2018 10:33:50 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit bc69104a442e1dd2338397a54a3a80eff170e78f
Author: Marius Bakke <address@hidden>
Date:   Tue Feb 27 17:09:43 2018 +0100

    gnu: python-testresources: Update to 2.0.1.
    
    * gnu/packages/check.scm (python-testresources-bootstrap,
    python2-testresources-bootstrap): New public variables.
    (python-testresources): Adjust accordingly.
    [propagated-inputs]: Add PYTHON-PBR.
    [native-inputs]: Add PYTHON-FIXTURES and PYTHON-TESTTOOLS.
    * gnu/packages/python.scm (python-pbr)[native-inputs]: Replace
    PYTHON-TESTRESOURCES with PYTHON-TESTRESOURCES-BOOTSTRAP.
---
 gnu/packages/check.scm  | 47 +++++++++++++++++++++++++++++++++--------------
 gnu/packages/python.scm |  2 +-
 2 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index fbb89ce..0a7d888 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -908,28 +908,47 @@ style tests.")
 (define-public python2-testscenarios
   (package-with-python2 python-testscenarios))
 
-(define-public python-testresources
+;; Testresources requires python-pbr at runtime, but pbr needs it for its
+;; own tests.  Hence this bootstrap variant.
+(define-public python-testresources-bootstrap
   (package
-    (name "python-testresources")
-    (version "0.2.7")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             
"https://pypi.python.org/packages/source/t/testresources/testresources-";
-             version ".tar.gz"))
-       (sha256
-        (base32
-         "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
+    (name "python-testresources-bootstrap")
+    (version "2.0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "testresources" version))
+              (sha256
+               (base32
+                "05s4dsli9g17m1r3b1gvwicbbgq011hnpb2b9qnj27ja2n11k7gf"))))
     (build-system python-build-system)
+    (arguments '(#:tests? #f))
+    (propagated-inputs
+     `(("python-pbr" ,python-pbr-minimal)))
     (home-page "https://launchpad.net/testresources";)
     (synopsis
      "Pyunit extension for managing test resources")
     (description
-     "Testresources is an extension to Python's unittest to allow declarative
-use of resources by test cases.")
+     "This package is only here for bootstrapping purposes.  Use the regular
+testresources package instead.")
     (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
 
+(define-public python2-testresources-bootstrap
+  (package-with-python2 python-testresources-bootstrap))
+
+(define-public python-testresources
+  (package
+    (inherit python-testresources-bootstrap)
+    (name "python-testresources")
+    (propagated-inputs
+     `(("python-pbr" ,python-pbr)))
+    (arguments '())
+    (native-inputs
+     `(("python-fixtures" ,python-fixtures)
+       ("python-testtols" ,python-testtools)))
+    (description
+     "Testresources is an extension to Python's unittest to allow declarative
+use of resources by test cases.")))
+
 (define-public python2-testresources
   (package-with-python2 python-testresources))
 
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index efe8e8c..22160bc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1695,7 +1695,7 @@ code introspection, and logging.")
         ("python-six" ,python-six)
         ("python-sphinx" ,python-sphinx)
         ("python-testrepository" ,python-testrepository-bootstrap)
-        ("python-testresources" ,python-testresources)
+        ("python-testresources" ,python-testresources-bootstrap)
         ("python-testscenarios" ,python-testscenarios)
         ("python-testtools" ,python-testtools)
         ("python-virtualenv" ,python-virtualenv)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]