From 4e1bcead4b282c95286cfaed9e23072a5abadfe4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 22 Mar 2023 13:09:05 +0200 Subject: python-pyshex: Downgrade to 0.7.14. * gn/packages/python.scm (python-pyshex): Downgrade to 0.7.14. [arguments]: Disable tests. Add phase to fix compatibility with rdflib-6. Adjust custom 'check phase. [propagated-inputs]: Remove python-chardet. Replace python-pyshexc with python-pyshexc-0.7, python-rdflib-shim with python-rdflib, python-sparqlsluper with python-sparql-slurper. --- gn/packages/python.scm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'gn/packages/python.scm') diff --git a/gn/packages/python.scm b/gn/packages/python.scm index 26b73b2..46aecd8 100644 --- a/gn/packages/python.scm +++ b/gn/packages/python.scm @@ -907,32 +907,37 @@ server.") (define-public python-pyshex (package (name "python-pyshex") - (version "0.8.1") + (version "0.7.14") (source (origin (method url-fetch) (uri (pypi-uri "PyShEx" version)) (sha256 - (base32 "1l3hprspx5l4zl28p1m79mwfxy5c86601jq3x3damyi7zr2lsp1w")))) + (base32 "1fy664bh6hpmr4cf49fwwxng36kv7s6b2986hbv0cqcypc4ri2cs")))) (arguments - '(#:phases + '(#:tests? #f ; Tests try to use the internet. + #:phases (modify-phases %standard-phases + (add-after 'unpack 'drop-rdflib-namespace-rdfnamespace + (lambda _ + ;; _RDFNamespace is in rdflib-5 + ;; https://github.com/hsolbrig/PyShEx/commit/d138a5b4f2249212f2141b7b9bbaff6696ee9415 + (substitute* "pyshex/prefixlib.py" + (("XMLNS, _RDFNamespace") "XMLNS")))) (replace 'check (lambda* (#:key inputs outputs tests? #:allow-other-keys) (when tests? (add-installed-pythonpath inputs outputs) (setenv "SKIP_EXTERNAL_URLS" "true") - (invoke "python" "-m" "unittest" "-k" - "test_sparql_options"))))))) + (invoke "python" "-m" "unittest"))))))) (build-system python-build-system) (propagated-inputs (list python-cfgraph - python-chardet - python-pyshexc - python-rdflib-shim + python-pyshexc-0.7 + python-rdflib python-requests python-shexjsg - python-sparqlslurper + python-sparql-slurper python-sparqlwrapper python-urllib3)) (native-inputs -- cgit v1.2.3