From 8fda8b7d6addf5e354e58e449c1a4a8894cb658b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 20:18:05 +0100 Subject: gnu: python-elementpath: Move to (gnu packages xml). * gnu/packages/python-xyz.scm (python-elementpath): Move from here ... * gnu/packages/xml.scm (python-elementpath): ... to here. --- gnu/packages/xml.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 5b9082cb26..83a2f1b713 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2017 Stefan Reichör ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2018 Jack Hill +;;; Copyright © 2019 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -2050,6 +2051,31 @@ (define-public xmlrpc-c modular implementation of XML-RPC for C and C++.") (license (list license:psfl license:expat)))) +(define-public python-elementpath + (package + (name "python-elementpath") + (version "1.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "elementpath" version)) + (sha256 + (base32 + "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p")))) + (build-system python-build-system) + (home-page + "https://github.com/sissaschool/elementpath") + (synopsis + "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml") + (description + "The proposal of this package is to provide XPath 1.0 and 2.0 selectors +for Python's ElementTree XML data structures, both for the standard +ElementTree library and for the @uref{http://lxml.de, lxml.etree} library. + +For lxml.etree this package can be useful for providing XPath 2.0 selectors, +because lxml.etree already has it's own implementation of XPath 1.0.") + (license license:expat))) + (define-public python-xmltodict (package (name "python-xmltodict") -- cgit v1.2.3 From b2205ae4f691c42573af19721fd1bd54f186fb58 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 20:18:35 +0100 Subject: gnu: python-elementpath: Update to 1.3.3. * gnu/packages/xml.scm (python-elementpath): Update to 1.3.3. --- gnu/packages/xml.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 83a2f1b713..7259efb0f7 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -2054,14 +2054,14 @@ (define-public xmlrpc-c (define-public python-elementpath (package (name "python-elementpath") - (version "1.2.0") + (version "1.3.3") (source (origin (method url-fetch) (uri (pypi-uri "elementpath" version)) (sha256 (base32 - "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p")))) + "1rb8892zli74wk1c4hyg77ja9wglq9hplgxwak1rmj3s9p6xnf0p")))) (build-system python-build-system) (home-page "https://github.com/sissaschool/elementpath") -- cgit v1.2.3 From 55e1475cb58c1b9535b35f8bdb157b1435c54755 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 20:19:26 +0100 Subject: gnu: python-lxml: Move to (gnu packages xml). * gnu/packages/python-xyz.scm (python-lxml): Move from here ... * gnu/packages/xml.scm (python-lxml): ... to here. * gnu/packages/django.scm, gnu/packages/drones.scm, gnu/packages/libreoffice.scm, gnu/packages/nutrition.scm, gnu/packages/openstack.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-science.scm, gnu/packages/tryton.scm, gnu/packages/wireservice.scm: Adjust module imports. --- gnu/packages/django.scm | 3 ++- gnu/packages/drones.scm | 1 + gnu/packages/libreoffice.scm | 1 - gnu/packages/nutrition.scm | 3 ++- gnu/packages/openstack.scm | 1 + gnu/packages/pulseaudio.scm | 1 + gnu/packages/python-science.scm | 1 + gnu/packages/python-xyz.scm | 29 ----------------------------- gnu/packages/tryton.scm | 1 + gnu/packages/wireservice.scm | 3 ++- gnu/packages/xml.scm | 29 +++++++++++++++++++++++++++++ 11 files changed, 40 insertions(+), 33 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 7e7bc5d002..f0551d8269 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -36,7 +36,8 @@ (define-module (gnu packages django) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) - #:use-module (gnu packages time)) + #:use-module (gnu packages time) + #:use-module (gnu packages xml)) (define-public python-django (package diff --git a/gnu/packages/drones.scm b/gnu/packages/drones.scm index 18b2621e4a..1bc096293e 100644 --- a/gnu/packages/drones.scm +++ b/gnu/packages/drones.scm @@ -23,6 +23,7 @@ (define-module (gnu packages drones) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages xml) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix git-download) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 038031b800..93474dbdbf 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -75,7 +75,6 @@ (define-module (gnu packages libreoffice) #:use-module (gnu packages perl-compression) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz) #:use-module (gnu packages rdf) #:use-module (gnu packages scanner) #:use-module (gnu packages tls) diff --git a/gnu/packages/nutrition.scm b/gnu/packages/nutrition.scm index 0e5533433e..bae166de3f 100644 --- a/gnu/packages/nutrition.scm +++ b/gnu/packages/nutrition.scm @@ -29,7 +29,8 @@ (define-module (gnu packages nutrition) #:use-module (gnu packages glib) #:use-module (gnu packages image) #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz)) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages xml)) (define-public gourmet (package diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index c976d8aafb..0d87691cd7 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -33,6 +33,7 @@ (define-module (gnu packages openstack) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) + #:use-module (gnu packages xml) #:use-module (guix build-system python) #:use-module (guix download) #:use-module ((guix licenses) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index 671dcd1563..8e67779e95 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -51,6 +51,7 @@ (define-module (gnu packages pulseaudio) #:use-module (gnu packages python-web) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xiph) + #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) (define-public libsndfile diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 4a262ec793..b4241362ba 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -37,6 +37,7 @@ (define-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) #:use-module (gnu packages time) + #:use-module (gnu packages xml) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1f8b936a12..479466cc81 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5784,35 +5784,6 @@ (define-public python-notify2 (define-public python2-notify2 (package-with-python2 python-notify2)) -(define-public python-lxml - (package - (name "python-lxml") - (version "4.4.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "lxml" version)) - (sha256 - (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg")))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "make" "test")))))) - (inputs - `(("libxml2" ,libxml2) - ("libxslt" ,libxslt))) - (home-page "https://lxml.de/") - (synopsis "Python XML processing library") - (description - "The lxml XML toolkit is a Pythonic binding for the C libraries -libxml2 and libxslt.") - (license license:bsd-3))) ; and a few more, see LICENSES.txt - -(define-public python2-lxml - (package-with-python2 python-lxml)) - ;; beautifulsoup4 has a totally different namespace than 3.x, ;; and pypi seems to put it under its own name, so I guess we should too (define-public python-beautifulsoup4 diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm index 31a2d481e5..a2952f2b80 100644 --- a/gnu/packages/tryton.scm +++ b/gnu/packages/tryton.scm @@ -27,6 +27,7 @@ (define-module (gnu packages tryton) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) + #:use-module (gnu packages xml) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system python)) diff --git a/gnu/packages/wireservice.scm b/gnu/packages/wireservice.scm index 362b69575f..eab76970f4 100644 --- a/gnu/packages/wireservice.scm +++ b/gnu/packages/wireservice.scm @@ -28,7 +28,8 @@ (define-module (gnu packages wireservice) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) - #:use-module (gnu packages time)) + #:use-module (gnu packages time) + #:use-module (gnu packages xml)) ;; Common package definition for packages from https://github.com/wireservice. (define-syntax-rule (wireservice-package extra-fields ...) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 7259efb0f7..73ee26ed10 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -2076,6 +2076,35 @@ (define-public python-elementpath because lxml.etree already has it's own implementation of XPath 1.0.") (license license:expat))) +(define-public python-lxml + (package + (name "python-lxml") + (version "4.4.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "lxml" version)) + (sha256 + (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "make" "test")))))) + (inputs + `(("libxml2" ,libxml2) + ("libxslt" ,libxslt))) + (home-page "https://lxml.de/") + (synopsis "Python XML processing library") + (description + "The lxml XML toolkit is a Pythonic binding for the C libraries +libxml2 and libxslt.") + (license license:bsd-3))) ; and a few more, see LICENSES.txt + +(define-public python2-lxml + (package-with-python2 python-lxml)) + (define-public python-xmltodict (package (name "python-xmltodict") -- cgit v1.2.3 From c950a2a51d1ad22cad4158ca13b88bf886df00d2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jan 2020 20:20:25 +0100 Subject: gnu: Add python-xmlschema. * gnu/packages/xml.scm (python-xmlschema): New public variable. --- gnu/packages/xml.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 73ee26ed10..9984e92f17 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice -;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke ;;; Copyright © 2017 Adriano Peluso ;;; Copyright © 2017 Gregor Giesen ;;; Copyright © 2017 Alex Vong @@ -2105,6 +2105,44 @@ (define-public python-lxml (define-public python2-lxml (package-with-python2 python-lxml)) +(define-public python-xmlschema + (package + (name "python-xmlschema") + (version "1.0.18") + (source (origin + (method url-fetch) + (uri (pypi-uri "xmlschema" version)) + (sha256 + (base32 + "1inwqwr7d3qah9xf9rfzkpva433jpr4n7n43zybf2gdpz4q1g0ry")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key (tests? #t) #:allow-other-keys) + (if tests? + (begin + (setenv "PYTHONPATH" + (string-append "./build/lib:" + (getenv "PYTHONPATH"))) + (invoke "python" "xmlschema/tests/test_all.py")) + (format #t "test suite not run~%")) + #t))))) + (native-inputs + `(("python-lxml" ,python-lxml))) ;for tests + (propagated-inputs + `(("python-elementpath" ,python-elementpath))) + (home-page "https://github.com/sissaschool/xmlschema") + (synopsis "XML Schema validator and data conversion library") + (description + "The @code{xmlschema} library is an implementation of +@url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has +full support for the XSD 1.0 and 1.1 standards, an XPath-based API for +finding schema's elements and attributes; and can encode and decode +XML data to JSON and other formats.") + (license license:expat))) + (define-public python-xmltodict (package (name "python-xmltodict") -- cgit v1.2.3