summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm40
1 files changed, 21 insertions, 19 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 266bf8b871..c152444632 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16555,40 +16555,45 @@ Python datatypes.")
 complex datatypes to and from native Python datatypes.")
     (license license:expat)))
 
-(define-public python2-marshmallow
-  (package-with-python2 python-marshmallow))
-
 (define-public python-apispec
   (package
     (name "python-apispec")
-    (version "0.25.3")
+    (version "4.0.0")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "apispec" version))
       (sha256
         (base32
-          "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
+          "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'disable-prance-tests
+                    (lambda _
+                      ;; Disable validation tests since they require the
+                      ;; optional 'prance' library which is not yet in Guix.
+                      (substitute* "tests/test_ext_marshmallow_openapi.py"
+                        (("def test_openapi_tools_validate.*" all)
+                         (string-append "@pytest.mark.xfail\n" all)))))
+                  (replace 'check
+                    (lambda _
+                      (setenv "PYTHONPATH"
+                              (string-append "./build/lib:"
+                                             (getenv "PYTHONPATH")))
+                      (invoke "pytest" "-vv"))))))
     (propagated-inputs
      `(("python-pyyaml" ,python-pyyaml)))
     (native-inputs
      `(("python-pytest" ,python-pytest)
-       ("python-flask" ,python-flask)
-       ("python-marshmallow" ,python-marshmallow)
-       ("python-tornado" ,python-tornado)
-       ("python-bottle" ,python-bottle)
-       ("python-mock" ,python-mock)))
+       ("python-marshmallow" ,python-marshmallow)))
     (home-page "https://github.com/marshmallow-code/apispec")
-    (synopsis "Swagger 2.0 API specification generator")
+    (synopsis "Swagger/OpenAPI specification generator")
     (description "@code{python-apispec} is a pluggable API specification
-generator. Currently supports the OpenAPI specification (f.k.a.
-Swagger 2.0).")
+generator.  It currently supports the OpenAPI specification, formerly known
+as Swagger.")
     (license license:expat)))
 
-(define-public python2-apispec
-  (package-with-python2 python-apispec))
-
 (define-public python-flasgger
   (package
     (name "python-flasgger")
@@ -16636,9 +16641,6 @@ Swagger 2.0).")
 from your Flask project.  It is a fork of Flask-Swagger.")
     (license license:expat)))
 
-(define-public python2-flasgger
-  (package-with-python2 python-flasgger))
-
 (define-public python-swagger-spec-validator
   (package
     (name "python-swagger-spec-validator")