summary refs log tree commit diff
path: root/gnu/packages/rdf.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-18 17:10:28 +0100
committerMarius Bakke <marius@gnu.org>2022-01-18 19:35:55 +0100
commit2a4c271e614d069423519af4be5511a0c25156f1 (patch)
tree965f05c23ebc0b687e1353ade39c79267564e869 /gnu/packages/rdf.scm
parentce58adbb3b96df2f7057fca7b233270ecbfc05c2 (diff)
downloadguix-2a4c271e614d069423519af4be5511a0c25156f1.tar.gz
gnu: python-rdflib: Update to 6.1.1.
* gnu/packages/rdf.scm (python-rdflib): Update to 6.1.1.
[arguments]: Remove #:tests.  Add #:phases.
[native-inputs]: Change from PYTHON-NOSE to PYTHON-PYTEST.
(python-rdflib-5): New variable.
(python2-rdflib): Inherit from PYTHON-RDFLIB-5.
* gnu/packages/python-xyz.scm (python-prov): Change from PYTHON-RDFLIB to
PYTHON-RDFLIB-5.
* gnu/packages/bioinformatics.scm (cwltool): Likewise.
Diffstat (limited to 'gnu/packages/rdf.scm')
-rw-r--r--gnu/packages/rdf.scm50
1 files changed, 37 insertions, 13 deletions
diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm
index 9b8b37a9ab..8ee7eec696 100644
--- a/gnu/packages/rdf.scm
+++ b/gnu/packages/rdf.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2020 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -345,27 +346,33 @@ ideal (e.g. in LV2 implementations or embedded applications).")
 (define-public python-rdflib
   (package
     (name "python-rdflib")
-    (version "4.2.2")
+    (version "6.1.1")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "rdflib" version))
         (sha256
          (base32
-          "0398c714znnhaa2x7v51b269hk20iz073knq2mvmqp2ma92z27fs"))))
+          "0m7pyq771vl4zf9xd3pxjbg7x6ac97b3djfbv9qq9fch56ps1gwd"))))
     (build-system python-build-system)
     (arguments
-     '(;; FIXME: Three test failures. Should be fixed next release.
-       #:tests? #f))
-       ;; #:phases
-       ;; (modify-phases %standard-phases
-       ;;   (replace 'check
-       ;;     (lambda _
-       ;;       ;; Run tests from the build directory so python3 only
-       ;;       ;; sees the installed 2to3 version.
-       ;;       (invoke "nosetests" "--where=./build/src"))))))
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'adjust-tests
+           (lambda _
+             (for-each delete-file
+                       '(;; This test needs a font that is not shipped.
+                         "test/test_so_69984830.py"
+                         ;; These tests need internet access.
+                         "test/jsonld/test_onedotone.py"
+                         "test/test_sparql_service.py"
+                         "test/test_graph.py"))))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "test/")))))))
     (native-inputs
-     (list python-nose))
+     (list python-pytest))
     (propagated-inputs
       (list python-html5lib python-isodate python-pyparsing))
     (home-page "https://github.com/RDFLib/rdflib")
@@ -376,9 +383,26 @@ powerful language for representing information.")
     (license (license:non-copyleft "file://LICENSE"
                                    "See LICENSE in the distribution."))))
 
+(define-public python-rdflib-5
+  (package
+    (inherit python-rdflib)
+    (version "5.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "rdflib" version))
+        (sha256
+         (base32
+          "0mdi7xh4zcr3ngqwlgqdqf0i5bxghwfddyxdng1zwpiqkpa9s53q"))))
+    ;; XXX: Lazily disable tests because they require a lot of work
+    ;; and this package is only transitional.
+    (arguments '(#:tests? #f))))
+
 (define-public python2-rdflib
-  (package-with-python2 python-rdflib))
+  (package-with-python2 python-rdflib-5))
 
+;; Note: This package is only needed for rdflib < 6.0; supersede when
+;; the above are removed.
 (define-public python-rdflib-jsonld
   (package
     (name "python-rdflib-jsonld")