From 6c0430f07a7e01ad695d7648f56e8f08307c1fff Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 5 Feb 2021 14:38:19 +0100 Subject: gnu: python2-matplotlib: Remove python-cairocffi. * gnu/packages/python-xyz.scm (python2-matplotlib)[propagated-inputs]: Remove python-cairocffi, because it cannot be built with Python 2. --- gnu/packages/python-xyz.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e296e3c6e1..a33aa4962f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2014, 2015 Federico Beffa ;;; Copyright © 2015 Omar Radwan ;;; Copyright © 2015 Pierre-Antoine Rault -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015, 2016 David Thompson @@ -5216,7 +5216,10 @@ toolkits.") ("python2-subprocess32" ,python2-subprocess32) ("python2-tkinter" ,python-2 "tk") ,@(fold alist-delete (package-propagated-inputs matplotlib) - '("python-pycairo" "python-pygobject" "python-tkinter"))))))) + '("python-cairocffi" + "python-pycairo" + "python-pygobject" + "python-tkinter"))))))) (define-public python-matplotlib-documentation (package -- cgit v1.2.3 From ff84f41a28346dcf686f78ecac84c8a3a49f3856 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 5 Feb 2021 14:39:15 +0100 Subject: gnu: python2-argcomplete: Fix build. * gnu/packages/python-xyz.scm (python2-argcomplete)[arguments]: Add phase to set HOME variable. [native-inputs]: Add python2-importlib-metadata. (python-argcomplete)[properties]: Record python2-variant. --- gnu/packages/python-xyz.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a33aa4962f..0d6ab9debb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14637,10 +14637,23 @@ of arguments and options for Python scripts using @code{argparse}. It's particularly useful for programs with many options or sub-parsers that can dynamically suggest completions; for example, when browsing resources over the network.") - (license license:asl2.0))) + (license license:asl2.0) + (properties `((python2-variant . ,(delay python2-argcomplete)))))) (define-public python2-argcomplete - (package-with-python2 python-argcomplete)) + (let ((variant (package-with-python2 + (strip-python2-variant python-argcomplete)))) + (package + (inherit variant) + (arguments + (substitute-keyword-arguments (package-arguments variant) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-after 'unpack 'set-my-HOME + (lambda _ (setenv "HOME" "/tmp"))))))) + (native-inputs + `(("python2-importlib-metadata" ,python2-importlib-metadata) + ,@(package-native-inputs variant)))))) (define-public python-csscompressor (package -- cgit v1.2.3 From 8cc13fcff534e4a8f37d675fed215a265bdaeb4e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 5 Feb 2021 23:26:51 +0100 Subject: gnu: python2-setuptools: Downgrade to 41.0.1. * gnu/packages/python-xyz.scm (python2-setuptools): Define older version instead of inheriting from python-setuptools. (python-setuptools)[properties]: Record python2-variant. --- gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 0d6ab9debb..572d48b0de 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1181,10 +1181,54 @@ Python 3 support.") (license (list license:psfl ; setuptools itself license:expat ; six, appdirs, pyparsing license:asl2.0 ; packaging is dual ASL2/BSD-2 - license:bsd-2)))) + license:bsd-2)) + (properties `((python2-variant . ,(delay python2-setuptools)))))) +;; Newer versions of setuptools no longer support Python 2. (define-public python2-setuptools - (package-with-python2 python-setuptools)) + (package + (name "python2-setuptools") + (version "41.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "setuptools" version ".zip")) + (sha256 + (base32 + "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove included binaries which are used to build self-extracting + ;; installers for Windows. + ;; TODO: Find some way to build them ourself so we can include them. + (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$")) + #t)))) + (build-system python-build-system) + ;; FIXME: Tests require pytest, which itself relies on setuptools. + ;; One could bootstrap with an internal untested setuptools. + (arguments + `(#:tests? #f)) + (native-inputs + `(("unzip" ,unzip))) + (home-page "https://pypi.org/project/setuptools/") + (synopsis + "Library designed to facilitate packaging Python projects") + (description + "Setuptools is a fully-featured, stable library designed to facilitate +packaging Python projects, where packaging includes: +Python package and module definitions, +distribution package metadata, +test hooks, +project installation, +platform-specific details, +Python 3 support.") + ;; TODO: setuptools now bundles the following libraries: + ;; packaging, pyparsing, six and appdirs. How to unbundle? + (license (list license:psfl ; setuptools itself + license:expat ; six, appdirs, pyparsing + license:asl2.0 ; packaging is dual ASL2/BSD-2 + license:bsd-2)))) ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow. (define-public python-setuptools-for-tensorflow -- cgit v1.2.3 From c85f44431a08c161ca00e35d97d1ab23012749c5 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 5 Feb 2021 23:29:45 +0100 Subject: gnu: python2-numpydoc: Add missing input. * gnu/packages/python-xyz.scm (python2-numpydoc)[propagated-inputs]: Add python2-jinja2. (python-numpydoc)[properties]: Record python2-variant. --- gnu/packages/python-xyz.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 572d48b0de..209bf5a6bc 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -4995,10 +4995,17 @@ that client code uses to construct the grammar directly in Python code.") "Numpy's Sphinx extensions") (description "Sphinx extension to support docstrings in Numpy format.") - (license license:bsd-2))) + (license license:bsd-2) + (properties `((python2-variant . ,(delay python2-numpydoc)))))) (define-public python2-numpydoc - (package-with-python2 python-numpydoc)) + (let ((base (package-with-python2 + (strip-python2-variant python-numpydoc)))) + (package + (inherit base) + (propagated-inputs + `(("python2-jinja2" ,python2-jinja2) + ,@(package-propagated-inputs base)))))) (define-public python-numexpr (package -- cgit v1.2.3 From 82f09bd0e052a015999220657c46bb1febba674c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 6 Feb 2021 10:42:03 +0100 Subject: gnu: Add python-multiprocessing-logging. * gnu/packages/python-xyz.scm (python-multiprocessing-logging): New public variable. --- gnu/packages/python-xyz.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 209bf5a6bc..e879742e5f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven -;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016, 2017, 2019 Alex Vong ;;; Copyright © 2016, 2017, 2018 Arun Isaac @@ -11975,6 +11975,28 @@ programmatically interfacing with your system's $EDITOR.") (define-public python2-editor (package-with-python2 python-editor)) +(define-public python-multiprocessing-logging + (package + (name "python-multiprocessing-logging") + (version "0.3.1") + (home-page "https://github.com/jruere/multiprocessing-logging") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y")))) + (build-system python-build-system) + (synopsis "Manage logs from multiple processes") + (description + "This Python module implements a multiprocessing-aware @code{Handler} +that, when set on the root @code{Logger}, will tunnel log records to the +main process so that they are handled correctly.") + (license license:lgpl3+))) + (define-public python-vobject (package (name "python-vobject") -- cgit v1.2.3 From 6176af29445a5694470edc1782118c567ad33b9d Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 5 Feb 2021 09:23:22 +0000 Subject: gnu: python-semantic-version: Update to 2.8.5. * gnu/packages/python-xyz.scm (python-semantic-version): Update to 2.8.5. [arguments]: Enable tests. Signed-off-by: Efraim Flashner --- gnu/packages/python-xyz.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e879742e5f..0b63b3b3d7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1080,17 +1080,15 @@ inter-process communication.") (define-public python-semantic-version (package (name "python-semantic-version") - (version "2.6.0") + (version "2.8.5") (source (origin (method url-fetch) (uri (pypi-uri "semantic_version" version)) (sha256 (base32 - "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra")))) + "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj")))) (build-system python-build-system) - (arguments - `(#:tests? #f)) ; PyPI tarball lacks tests (home-page "https://github.com/rbarrois/python-semanticversion") (synopsis "Semantic versioning module for Python") (description -- cgit v1.2.3 From bdb3263c146f9e7ee5f982cb8f448af5b498b293 Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Mon, 1 Feb 2021 09:52:30 +0100 Subject: gnu: python-pkginfo: Update to 1.7.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-pkginfo): Udpate to 1.7.0. Signed-off-by: 宋文武 --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 0b63b3b3d7..c6310e62b0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17281,14 +17281,14 @@ design and layout.") (define-public python-pkginfo (package (name "python-pkginfo") - (version "1.4.2") + (version "1.7.0") (source (origin (method url-fetch) (uri (pypi-uri "pkginfo" version)) (sha256 (base32 - "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q")))) + "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2")))) (build-system python-build-system) (arguments ;; The tests are broken upstream. -- cgit v1.2.3 From 07143d9fe11151b884901186bace1b3ec65d9f40 Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Mon, 1 Feb 2021 09:52:31 +0100 Subject: gnu: python-pkginfo: Enable tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-pkginfo)[arguments]: Don't disable tests. Disable a failing test. Signed-off-by: 宋文武 --- gnu/packages/python-xyz.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c6310e62b0..5e6f902a76 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17291,8 +17291,14 @@ design and layout.") "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2")))) (build-system python-build-system) (arguments - ;; The tests are broken upstream. - '(#:tests? #f)) + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'patch-tests + (lambda _ + (substitute* "pkginfo/tests/test_installed.py" + (("test_ctor_w_package_no_PKG_INFO") + "_test_ctor_w_package_no_PKG_INFO")) + #t))))) (home-page "https://code.launchpad.net/~tseaver/pkginfo/trunk") (synopsis -- cgit v1.2.3 From 7cabeb80d4503ef4b7e533e4ac49a4ca0679f81a Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 11 Feb 2021 17:46:02 +0100 Subject: gnu: Add python-crayons. * gnu/packages/python-xyz.scm (python-crayons): New variable. --- gnu/packages/python-xyz.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5e6f902a76..783812eb03 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -30,7 +30,7 @@ ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016, 2017, 2019 Alex Vong ;;; Copyright © 2016, 2017, 2018 Arun Isaac -;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller +;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Thomas Danckaert ;;; Copyright © 2017 Carlo Zancanaro @@ -23739,3 +23739,24 @@ implementations.") "Pivy provides python bindings for Coin, a 3D graphics library with an Application Programming Interface based on the Open Inventor 2.1 API.") (license license:isc))) + +(define-public python-crayons + (package + (name "python-crayons") + (version "0.4.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "crayons" version)) + (sha256 + (base32 + "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx")))) + (build-system python-build-system) + (propagated-inputs + `(("python-colorama" ,python-colorama))) + (home-page "https://github.com/MasterOdin/crayons") + (synopsis "TextUI colors for Python") + (description "This package gives you colored strings for the terminal. +Crayons automatically wraps a given string in the foreground color and +restores the original state after the string is printed.") + (license license:expat))) -- cgit v1.2.3