diff options
Diffstat (limited to 'gnu/packages/rdf.scm')
-rw-r--r-- | gnu/packages/rdf.scm | 92 |
1 files changed, 67 insertions, 25 deletions
diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index 83e5912464..e3a26cf734 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2020 Pjotr Prins <[email protected]> ;;; Copyright © 2020 Efraim Flashner <[email protected]> ;;; Copyright © 2020 pukkamustard <[email protected]> +;;; Copyright © 2022 Marius Bakke <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages rdf) + #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix git-download) @@ -124,7 +126,7 @@ Java Lucene text search engine API to C++.") (define-public lucene++ (package (name "lucene++") - (version "3.0.7") + (version "3.0.8") (source (origin (method git-fetch) (uri (git-reference @@ -133,19 +135,35 @@ Java Lucene text search engine API to C++.") (file-name (git-file-name name version)) (sha256 (base32 - "06b37fly6l27zc6kbm93f6khfsv61w792j8xihfagpcm9cfz2zi1")))) + "12v7r62f7pqh5h210pb74sfx6h70lj4pgfpva8ya2d55fn0qxrr2")) + (modules '((guix build utils))) + (snippet + #~(begin + (substitute* (list "src/config/core/CMakeLists.txt" + "src/config/contrib/CMakeLists.txt") + (("include/pkgconfig") + "lib/pkgconfig") + (("include/cmake") + "share/cmake/lucene++")))))) (build-system cmake-build-system) (arguments - `(#:configure-flags - ;; CXX_FLAGS suggested in a closed issue on github: - ;; https://github.com/luceneplusplus/LucenePlusPlus/issues/100 - (list "-Wno-dev" "-DCMAKE_CXX_FLAGS=-DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT" - ;; Install in lib64 break rpath - "-DCMAKE_INSTALL_LIBDIR:PATH=lib"))) + (list #:configure-flags + #~(list (string-append "-DLIB_DESTINATION:PATH=" + #$output "/lib") + "-DINSTALL_GTEST:BOOL=OFF") + #:phases + #~(modify-phases %standard-phases + (replace 'check + ;; XXX Tests are built unconditionally during the 'build phase. + ;; There's no ‘test’ target. README.md suggests running this. + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "src/test/lucene++-tester" + "--test_dir=../source/src/test/testfiles"))))))) (native-inputs (list pkg-config)) (inputs - (list boost)) + (list boost zlib)) (home-page "https://github.com/luceneplusplus/LucenePlusPlus") (synopsis "Text search engine") (description "Lucene++ is an up to date C++ port of the popular Java @@ -328,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") @@ -359,20 +383,37 @@ 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") - (version "0.5.0") + (version "0.6.2") (source (origin (method url-fetch) (uri (pypi-uri "rdflib-jsonld" version)) (sha256 (base32 - "1v85f4hdlrrk0l1najmqmm79ijrvcj259kwsrrxiq1q5chr5azag")))) + "0qrshlqzv5g5bign7kjja3xf7hyk7xgayr3yd0qlqda1kl0x6z0h")))) (build-system python-build-system) (native-inputs (list python-nose)) @@ -446,7 +487,8 @@ C++ library as well as various command-line tools to to work with HDT.") (arguments '(#:tests? #f)) ; The test suite simply queries external HTTP endpoints. (native-inputs - (list python-nose)) + ;; Build with setuptools <58 to get lib2to3 support. + (list python-nose python-setuptools)) (propagated-inputs (list python-rdflib)) (home-page "https://rdflib.dev/sparqlwrapper/") |