diff options
-rw-r--r-- | gnu/packages/graphviz.scm | 1 | ||||
-rw-r--r-- | gnu/packages/monitoring.scm | 1 | ||||
-rw-r--r-- | gnu/packages/openstack.scm | 1 | ||||
-rw-r--r-- | gnu/packages/package-management.scm | 1 | ||||
-rw-r--r-- | gnu/packages/python-build.scm | 114 | ||||
-rw-r--r-- | gnu/packages/python-xyz.scm | 139 | ||||
-rw-r--r-- | gnu/packages/rdf.scm | 1 |
7 files changed, 125 insertions, 133 deletions
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index 39d956b3cb..42c4c0fe57 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -50,6 +50,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 999cfcb8b0..c8316c5212 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -56,6 +56,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rrdtool) diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index 1c35fe570f..b614bcf0d1 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages check) #:use-module (gnu packages gnupg) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 660c43604d..c15c1c1c6d 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -86,6 +86,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 59ee91aa9c..0688dcbf04 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -23,6 +23,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages python-build) + #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system python) #:use-module (guix download) @@ -107,6 +108,32 @@ Language (TOML) configuration files.") (description "This package provides a Python parser for TOML-0.4.0.") (license license:expat))) +(define-public python-six-bootstrap + (package + (name "python-six-bootstrap") + (version "1.15.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "six" version)) + (sha256 + (base32 + "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh")))) + (build-system python-build-system) + (arguments `(#:tests? #f)) ;to avoid pytest dependency + (home-page "https://pypi.org/project/six/") + (synopsis "Python 2 and 3 compatibility utilities") + (description + "Six is a Python 2 and 3 compatibility library. It provides utility +functions for smoothing over the differences between the Python versions with +the goal of writing Python code that is compatible on both Python versions. +Six supports every Python version since 2.5. It is contained in only one +Python file, so it can be easily copied into your project.") + (license license:x11))) + +(define-public python2-six-bootstrap + (package-with-python2 python-six-bootstrap)) + (define-public python-pep517-bootstrap (hidden-package (package @@ -131,6 +158,93 @@ Language (TOML) configuration files.") "Wrappers to build Python packages using PEP 517 hooks.") (license license:expat)))) +(define-public python-pyparsing + (package + (name "python-pyparsing") + (version "2.4.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyparsing" version)) + (sha256 + (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2")))) + (build-system python-build-system) + (outputs '("out" "doc")) + (arguments + `(#:tests? #f ;no test target + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((doc (string-append (assoc-ref outputs "doc") + "/share/doc/" ,name "-" ,version)) + (html-doc (string-append doc "/html")) + (examples (string-append doc "/examples"))) + (mkdir-p html-doc) + (mkdir-p examples) + (for-each + (lambda (dir tgt) + (map (lambda (file) + (install-file file tgt)) + (find-files dir ".*"))) + (list "docs" "htmldoc" "examples") + (list doc html-doc examples)))))))) + (home-page "https://github.com/pyparsing/pyparsing") + (synopsis "Python parsing class library") + (description + "The pyparsing module is an alternative approach to creating and +executing simple grammars, vs. the traditional lex/yacc approach, or the use +of regular expressions. The pyparsing module provides a library of classes +that client code uses to construct the grammar directly in Python code.") + (license license:expat))) + +(define-public python-pyparsing-2.4.7 + (package + (inherit python-pyparsing) + (version "2.4.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyparsing" version)) + (sha256 + (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2")))))) + +(define-public python2-pyparsing + (package-with-python2 python-pyparsing)) + +(define-public python-packaging-bootstrap + (package + (name "python-packaging-bootstrap") + (version "20.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "packaging" version)) + ;; XXX: The URL in the patch file is wrong, it should be + ;; <https://github.com/pypa/packaging/pull/256>. + (patches (search-patches "python-packaging-test-arch.patch")) + (sha256 + (base32 + "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy")))) + (build-system python-build-system) + (arguments `(#:tests? #f)) ;disabled to avoid extra dependencies + (propagated-inputs + `(("python-pyparsing" ,python-pyparsing) + ("python-six-bootstrap" ,python-six-bootstrap))) + (home-page "https://github.com/pypa/packaging") + (synopsis "Core utilities for Python packages") + (description "Packaging is a Python module for dealing with Python packages. +It offers an interface for working with package versions, names, and dependency +information.") + ;; From 'LICENSE': This software is made available under the terms of + ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD. + ;; Contributions to this software is made under the terms of *both* these + ;; licenses. + (license (list license:asl2.0 license:bsd-2)))) + +(define-public python2-packaging-bootstrap + (package-with-python2 python-packaging-bootstrap)) + ;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid ;;; a name clash with python-build from (guix build-system python). (define-public python-pypa-build diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4a3ccbaab0..140ab99dfc 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2424,48 +2424,20 @@ in the current session, Python, and the OS.") (license license:bsd-3))) (define-public python-six - (package + (package/inherit python-six-bootstrap (name "python-six") - (version "1.15.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "six" version)) - (sha256 - (base32 - "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh")))) - (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - (invoke "py.test" "-v")))))) + (invoke "pytest" "-v")))))) (native-inputs - `(("python-pytest" ,python-pytest-bootstrap))) - (home-page "https://pypi.org/project/six/") - (synopsis "Python 2 and 3 compatibility utilities") - (description - "Six is a Python 2 and 3 compatibility library. It provides utility -functions for smoothing over the differences between the Python versions with -the goal of writing Python code that is compatible on both Python versions. -Six supports every Python version since 2.5. It is contained in only one -Python file, so it can be easily copied into your project.") - (license license:x11))) + `(("python-pytest" ,python-pytest-bootstrap))))) (define-public python2-six (package-with-python2 python-six)) -(define-public python-six-bootstrap - (package - (inherit python-six) - (name "python-six-bootstrap") - (native-inputs `()) - (arguments `(#:tests? #f)))) - -(define-public python2-six-bootstrap - (package-with-python2 python-six-bootstrap)) - (define-public python-schedule (package (name "python-schedule") @@ -5907,61 +5879,6 @@ parse and apply unified diffs. It has features such as: @end itemize") (license license:expat))) -(define-public python-pyparsing - (package - (name "python-pyparsing") - (version "2.4.6") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pyparsing" version)) - (sha256 - (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc")))) - (build-system python-build-system) - (outputs '("out" "doc")) - (arguments - `(#:tests? #f ; no test target - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let* ((doc (string-append (assoc-ref outputs "doc") - "/share/doc/" ,name "-" ,version)) - (html-doc (string-append doc "/html")) - (examples (string-append doc "/examples"))) - (mkdir-p html-doc) - (mkdir-p examples) - (for-each - (lambda (dir tgt) - (map (lambda (file) - (install-file file tgt)) - (find-files dir ".*"))) - (list "docs" "htmldoc" "examples") - (list doc html-doc examples)) - #t)))))) - (home-page "https://github.com/pyparsing/pyparsing") - (synopsis "Python parsing class library") - (description - "The pyparsing module is an alternative approach to creating and -executing simple grammars, vs. the traditional lex/yacc approach, or the use -of regular expressions. The pyparsing module provides a library of classes -that client code uses to construct the grammar directly in Python code.") - (license license:expat))) - -(define-public python2-pyparsing - (package-with-python2 python-pyparsing)) - -(define-public python-pyparsing-2.4.7 - (package - (inherit python-pyparsing) - (version "2.4.7") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pyparsing" version)) - (sha256 - (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2")))))) - (define-public python-numpydoc (package (name "python-numpydoc") @@ -18550,28 +18467,15 @@ several utilities, as well as an API for building localization tools.") (package-with-python2 python-translate-toolkit)) (define-public python-packaging - (package + (package/inherit python-packaging-bootstrap (name "python-packaging") - (version "20.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "packaging" version)) - ;; XXX: The URL in the patch file is wrong, it should be - ;; <https://github.com/pypa/packaging/pull/256>. - (patches (search-patches "python-packaging-test-arch.patch")) - (sha256 - (base32 - "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy")))) - (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? - (invoke "py.test" "-vv") - (format #t "test suite not run~%")) - #t))))) + (invoke "pytest" "-vv") + (format #t "test suite not run~%"))))))) (native-inputs `(("python-pretend" ,python-pretend) ("python-pytest" ,python-pytest))) @@ -18592,37 +18496,6 @@ information.") (define-public python2-packaging (package-with-python2 python-packaging)) -;; Variants with minimal dependencies, for bootstrapping Pytest. -(define-public python-packaging-bootstrap - (hidden-package - (package/inherit - python-packaging - (name "python-packaging-bootstrap") - (arguments - (substitute-keyword-arguments (package-arguments python-packaging) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'fix-dependencies - (lambda* (#:key tests? #:allow-other-keys) - (substitute* "setup.py" (("\"six\"") "")))))) - ((#:tests? _ #f) #f))) - (native-inputs '()) - (propagated-inputs - `(("python-pyparsing" ,python-pyparsing)))))) - -(define-public python2-packaging-bootstrap - (hidden-package - (package/inherit - python2-packaging - (name "python2-packaging-bootstrap") - (native-inputs '()) - (propagated-inputs - `(("python-pyparsing" ,python2-pyparsing) - ("python-six" ,python2-six-bootstrap))) - (arguments - `(#:tests? #f - ,@(package-arguments python2-packaging)))))) - (define-public python-relatorio (package (name "python-relatorio") diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index fb84d8053d..4b7e6ce29e 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) |