[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
95/142: gnu: Move a few Python packages to (gnu packages python-build).
From: |
guix-commits |
Subject: |
95/142: gnu: Move a few Python packages to (gnu packages python-build). |
Date: |
Wed, 20 Oct 2021 14:56:49 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 2dd6fad385fe5a3026563a6fa13cb3511b22cf9b
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Oct 1 15:49:13 2021 -0400
gnu: Move a few Python packages to (gnu packages python-build).
This is in prevision of updating python-pypa-build, which now requires
python-packaging and adding python-tomli, which requires python-six.
* gnu/packages/python-xyz.scm (python-six)
(python-six-bootstrap, python2-six-bootstrap)
(python-pyparsing, python2-pyparsing, python-pyparsing-2.4.7)
(python-packaging-bootstrap, python2-packaging-bootstrap): Move packages
to...
* gnu/packages/python-build.scm: ... here. Update python-parsing to latest.
* gnu/packages/python-xyz.scm (python-six, python-packaging): Adjust to
inherit from their bootstrap versions.
---
gnu/packages/graphviz.scm | 1 +
gnu/packages/monitoring.scm | 1 +
gnu/packages/openstack.scm | 1 +
gnu/packages/package-management.scm | 1 +
gnu/packages/python-build.scm | 114 +++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 139 ++----------------------------------
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 39d956b..42c4c0f 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 999cfcb..c8316c5 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 1c35fe5..b614bcf 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 65cd708..81c1179 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 59ee91a..0688dcb 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 caa9d5d..ebad333 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")
@@ -5900,61 +5872,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")
@@ -18518,28 +18435,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)))
@@ -18560,37 +18464,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 fb84d80..4b7e6ce 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)
- 51/142: gnu: pulseaudio: Update to 15.0., (continued)
- 51/142: gnu: pulseaudio: Update to 15.0., guix-commits, 2021/10/20
- 42/142: gnu: gst-plugins-good: Update to 1.19.2., guix-commits, 2021/10/20
- 54/142: gnu: abseil-cpp: Remove googletest patch., guix-commits, 2021/10/20
- 67/142: gnu: python-gst: Update to 1.18.5., guix-commits, 2021/10/20
- 69/142: gnu: tensorflow: Enable parallel build (at least partially)., guix-commits, 2021/10/20
- 68/142: gnu: gstreamer-docs: Update to 1.18.5., guix-commits, 2021/10/20
- 70/142: gnu: python-keras: Enable parallel tests., guix-commits, 2021/10/20
- 66/142: gnu: gst-editing-services: Update to 1.18.5., guix-commits, 2021/10/20
- 76/142: gnu: glibc: Look for the current timezone in /etc/localtime., guix-commits, 2021/10/20
- 78/142: gnu: gtk+-2: Fix ‘builder’ test., guix-commits, 2021/10/20
- 95/142: gnu: Move a few Python packages to (gnu packages python-build).,
guix-commits <=
- 100/142: gnu: python-pytest-6: Fix version via setuptools-scm., guix-commits, 2021/10/20
- 101/142: gnu: python-pathlib2: Update to 2.3.6., guix-commits, 2021/10/20
- 112/142: gnu: libcloudproviders-minimal: Introduce minimal variant., guix-commits, 2021/10/20
- 113/142: gnu: gusb-minimal: Introduce minimal variant., guix-commits, 2021/10/20
- 126/142: gnu: glib-networking: Update to 2.70.rc., guix-commits, 2021/10/20
- 04/142: gnu: pulseaudio: Update to 14.2., guix-commits, 2021/10/20
- 18/142: gnu: cheese: Propagate gdk-pixbuf+svg rather than gdk-pixbuf., guix-commits, 2021/10/20
- 49/142: gnu: e2fsprogs: Update to 1.46.4., guix-commits, 2021/10/20
- 55/142: gnu: abseil-cpp: Update to 20210324.2., guix-commits, 2021/10/20
- 61/142: gnu: gst-plugins-base: Update to 1.18.5., guix-commits, 2021/10/20