Package: guix-patches;
Reported by: Thomas Danckaert <post <at> thomasdanckaert.be>
Date: Wed, 22 Feb 2017 10:31:01 UTC
Severity: normal
Tags: patch
Merged with 25705
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25834 in the body.
You can then email your comments to 25834 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 10:31:02 GMT) Full text and rfc822 format available.Thomas Danckaert <post <at> thomasdanckaert.be>
:guix-patches <at> gnu.org
.
(Wed, 22 Feb 2017 10:31:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: guix-patches <at> gnu.org Subject: Update scientific Python packages Date: Wed, 22 Feb 2017 11:30:15 +0100 (CET)
Hi, I'm submitting a patch series to update numpy, matplotlib, scipy and ipython. I've split out the documentation for numpy and matplotlib into separate packages to avoid issues with the following cyclic dependencies: - numpy documentation depends on matplotlib, which depends on numpy. - documentation for the new version of matplotlib also depends on ipython, which depends on matplotlib and numpy. If the preference is to work with multiple outputs instead, I can work out something with “bootstrap” packages and package-input-rewriting, but I like the simplicity of separate documentation packages (which also avoids repeatedly building the same package for bootstrapping purposes). Thomas
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 12:04:01 GMT) Full text and rfc822 format available.Message #8 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Ricardo Wurmus <rekado <at> elephly.net> To: Thomas Danckaert <post <at> thomasdanckaert.be> Cc: 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: Update scientific Python packages Date: Wed, 22 Feb 2017 13:02:52 +0100
Thomas Danckaert <post <at> thomasdanckaert.be> writes: > I'm submitting a patch series to update numpy, matplotlib, scipy and > ipython. I've split out the documentation for numpy and matplotlib > into separate packages to avoid issues with the following cyclic > dependencies: > > - numpy documentation depends on matplotlib, which depends on numpy. > > - documentation for the new version of matplotlib also depends on > ipython, which depends on matplotlib and numpy. > > If the preference is to work with multiple outputs instead, I can > work out something with “bootstrap” packages and > package-input-rewriting, but I like the simplicity of separate > documentation packages (which also avoids repeatedly building the > same package for bootstrapping purposes). Thanks for taking this on! My preference is to have separate documentation packages when this allows us to avoid a host of intermediate bootstrapping packages. This was acceptable for numpy and matplotlib in the past, but now that the cycle has grown even larger, I’d prefer to cut the dependency by turning them into separate packages. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:11:01 GMT) Full text and rfc822 format available.Message #11 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 1/7] gnu: Add python2-backports-shutil-get-terminal-size. Date: Wed, 22 Feb 2017 12:22:47 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python2-backports-shutil-get-terminal-size): New variable. --- gnu/packages/python.scm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 432298472..13906153c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -33,7 +33,7 @@ ;;; Copyright © 2016 Arun Isaac <arunisaac <at> systemreboot.net> ;;; Copyright © 2016, 2017 Julien Lepiller <julien <at> lepiller.eu> ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me <at> tobias.gr> -;;; Copyright © 2016 Thomas Danckaert <post <at> thomasdanckaert.be> +;;; Copyright © 2016, 2017 Thomas Danckaert <post <at> thomasdanckaert.be> ;;; Copyright © 2017 Carlo Zancanaro <carlo <at> zancanaro.id.au> ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis <at> gmail.com> ;;; @@ -5787,6 +5787,32 @@ connection to each user.") (define-public python2-backports-abc (package-with-python2 python-backports-abc)) +(define-public python2-backports-shutil-get-terminal-size + (package-with-python2 + (package + (name "python-backports-shutil-get-terminal-size") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/ec/9c/" + "368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/" + "backports.shutil_get_terminal_size-" version ".tar.gz")) + (sha256 + (base32 + "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) + (build-system python-build-system) + (home-page + "https://github.com/chrippa/backports.shutil_get_terminal_size") + (synopsis + "Backport of Python 3.3's @code{shutil.get_terminal_size()}") + (description + "A backport of the get_terminal_size function from Python 3.3's shutil. +Unlike the original version it is written in pure Python rather than C, so it +might be a tiny bit slower.") + (license license:expat)))) + (define-public python-waf (package (name "python-waf") -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:36:01 GMT) Full text and rfc822 format available.Message #14 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 2/7] gnu: Add python-colorspacious. Date: Wed, 22 Feb 2017 12:22:48 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python-colorspacious, python2-colorspacious): New variables. --- gnu/packages/python.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 13906153c..a9afbdfd6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3631,6 +3631,30 @@ To address this and enable easy cycling over arbitrary @code{kwargs}, the (define-public python2-cycler (package-with-python2 python-cycler)) +(define-public python-colorspacious + (package + (name "python-colorspacious") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/njsmith/colorspacious/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version)) + (sha256 + (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k")))) + (build-system python-build-system) + (propagated-inputs + `(("python-numpy" ,python-numpy))) + (home-page "https://github.com/njsmith/colorspacious") + (synopsis "Python library for colorspace conversions") + (description "Colorspacious is a Python library that lets you easily convert +between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") + (license license:expat))) + +(define-public python2-colorspacious + (package-with-python2 python-colorspacious)) + (define-public python-matplotlib (package (name "python-matplotlib") -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:36:02 GMT) Full text and rfc822 format available.Message #17 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 3/7] gnu: python-sphinx: Update to 1.5.2. Date: Wed, 22 Feb 2017 12:22:49 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python-sphinx): Update to 1.5.2. [propagated-inputs]: Add python-sphinx-alabaster-theme, python-sphinx-rtd-theme, python-babel, python-requests, python-snowballstemmer and python-imagesize. --- gnu/packages/python.scm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a9afbdfd6..95cea0e89 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2907,21 +2907,26 @@ reStructuredText.") (define-public python-sphinx (package (name "python-sphinx") - (version "1.2.3") + (version "1.5.2") (source (origin (method url-fetch) (uri (string-append - "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-" - version ".tar.gz")) + "https://github.com/sphinx-doc/sphinx/archive/" version ".tar.gz")) (sha256 (base32 - "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl")))) + "1vjp7h60y6v0sdh67s26hmbrh1n7jhb3xdb98rqvilb59fnj9br1")))) (build-system python-build-system) (propagated-inputs - `(("python-jinja2" ,python-jinja2) + `(("python-sphinx-alabaster-theme" ,python-sphinx-alabaster-theme) + ("python-sphinx-rtd-theme", python-sphinx-rtd-theme) + ("python-jinja2" ,python-jinja2) + ("python-babel" ,python-babel) ("python-docutils" ,python-docutils) - ("python-pygments" ,python-pygments))) + ("python-pygments" ,python-pygments) + ("python-requests" ,python-requests) + ("python-snowballstemmer" ,python-snowballstemmer) + ("python-imagesize" ,python-imagesize))) (home-page "http://sphinx-doc.org/") (synopsis "Python documentation generator") (description "Sphinx is a tool that makes it easy to create documentation -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:36:02 GMT) Full text and rfc822 format available.Message #20 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 4/7] gnu: python-numpy: Update to 1.12.0. Date: Wed, 22 Feb 2017 12:22:50 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python-numpy): Update to 1.12.0. [source]: Use github instead of sourceforge. [native-inputs]: Add python-cython. To simplify the handling of dependency cycles (numpy documentation depends on matplotlib, which depends on numpy), we split out the documentation into a separate package: (python-numpy-bootstrap, python2-numpy-bootstrap): Remove variables. (python-numpy-documentation, python2-numpy-documentation): New variables. --- gnu/packages/python.scm | 146 ++++++++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 67 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 95cea0e89..c45cc9db4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3278,24 +3278,26 @@ between language specification and implementation aspects.") ;; This version of numpy is missing the documentation and is only used to ;; build matplotlib which is required to build numpy's documentation. -(define python-numpy-bootstrap +(define-public python-numpy (package - (name "python-numpy-bootstrap") - (version "1.10.4") + (name "python-numpy") + (version "1.12.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/numpy/NumPy/" version - "/numpy-" version ".tar.gz")) + (uri (string-append + "https://github.com/numpy/numpy/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp")))) + "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d")))) (build-system python-build-system) (inputs `(("openblas" ,openblas) ("lapack" ,lapack))) (native-inputs - `(("python-nose" ,python-nose) + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) ("gfortran" ,gfortran))) (arguments `(#:phases @@ -3344,8 +3346,8 @@ and Fortran code, useful linear algebra, Fourier transform, and random number capabilities.") (license license:bsd-3))) -(define python2-numpy-bootstrap - (package-with-python2 python-numpy-bootstrap)) +(define-public python2-numpy + (package-with-python2 python-numpy)) (define-public python-munch (package @@ -3401,69 +3403,79 @@ Models, is a program for performing both single-SNP and SNP-set genome-wide association studies (GWAS) on extremely large data sets.") (license license:asl2.0))) -(define-public python-numpy - (package (inherit python-numpy-bootstrap) - (name "python-numpy") - (outputs '("out" "doc")) - (inputs - `(("which" ,which) - ,@(package-inputs python-numpy-bootstrap))) - (propagated-inputs - `(("python-matplotlib" ,python-matplotlib) - ("python-pyparsing" ,python-pyparsing) - ,@(package-propagated-inputs python-numpy-bootstrap))) +(define-public python-numpy-documentation + (package (inherit python-numpy) + (name "python-numpy-documentation") (native-inputs - `(("pkg-config" ,pkg-config) + `(("python-matplotlib" ,python-matplotlib) + ("python-numpy" ,python-numpy) + ("pkg-config" ,pkg-config) ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("texlive" ,texlive) ("texinfo" ,texinfo) ("perl" ,perl) - ,@(package-native-inputs python-numpy-bootstrap))) - (arguments - `(,@(substitute-keyword-arguments - (package-arguments python-numpy-bootstrap) - ((#:phases phases) - `(alist-cons-after - 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append - data "/doc/" ,name "-" - ,(package-version python-numpy-bootstrap))) - (info (string-append data "/info")) - (html (string-append doc "/html")) - (pyver ,(string-append "PYVER="))) - (with-directory-excursion "doc" - (mkdir-p html) - (system* "make" "html" pyver) - (system* "make" "latex" "PAPER=a4" pyver) - (system* "make" "-C" "build/latex" - "all-pdf" "PAPER=a4" pyver) - ;; FIXME: Generation of the info file fails. - ;; (system* "make" "info" pyver) - ;; (mkdir-p info) - ;; (copy-file "build/texinfo/numpy.info" - ;; (string-append info "/numpy.info")) - (for-each (lambda (file) - (copy-file (string-append "build/latex" file) - (string-append doc file))) - '("/numpy-ref.pdf" "/numpy-user.pdf")) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (unless (equal? "." dir) - (mkdir-p tgt-dir)) - (install-file file html))) - (find-files "." ".*")))))) - ,phases))))))) - -(define-public python2-numpy - (package-with-python2 python-numpy)) + ("scipy-sphinx-theme" + ,(origin ; The build script expects scipy-sphinx-theme as a git submodule + (method git-fetch) + (uri (git-reference + (url "https://github.com/scipy/scipy-sphinx-theme.git") + (commit "c466764e22"))) + (sha256 + (base32 + "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) + ,@(package-native-inputs python-numpy))) + (arguments + `(#:tests? #f ; we're only generating the documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make installed package available for building the + ;; documentation + (add-installed-pythonpath inputs outputs) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append + data "/doc/" ,name "-" + ,(package-version python-numpy))) + (info-reader (string-append data "/info")) + (html (string-append doc "/html")) + (scipy-sphinx-theme "scipy-sphinx-theme") + (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) + (pyver ,(string-append "PYVER="))) + (with-directory-excursion "doc" + (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) + (mkdir-p html) + (system* "make" "html" pyver) + (system* "make" "latex" "PAPER=a4" pyver) + (system* "make" "-C" "build/latex" + "all-pdf" "PAPER=a4" pyver) + ;; FIXME: Generation of the info file fails. + ;; (system* "make" "info" pyver) + ;; (mkdir-p info) + ;; (copy-file "build/texinfo/numpy.info" + ;; (string-append info "/numpy.info")) + (for-each (lambda (file) + (copy-file (string-append "build/latex" file) + (string-append doc file))) + '("/numpy-ref.pdf" "/numpy-user.pdf")) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (unless (equal? "." dir) + (mkdir-p tgt-dir)) + (install-file file html))) + (find-files "." ".*")))))))))) + (synopsis "Documentation for the python-numpy package"))) + +(define-public python2-numpy-documentation + (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) + (package + (inherit numpy-documentation) + (native-inputs `(("python2-functools32" ,python2-functools32) + ,@(package-native-inputs numpy-documentation)))))) (define-public python-pygit2 (package @@ -3682,7 +3694,7 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") ("python-dateutil" ,python-dateutil-2) - ("python-numpy" ,python-numpy-bootstrap) + ("python-numpy" ,python-numpy) ("python-pillow" ,python-pillow) ("python-pytz" ,python-pytz) ("python-six" ,python-six) -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:36:03 GMT) Full text and rfc822 format available.Message #23 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 6/7] gnu: python-ipython: Update to 5.2.2. Date: Wed, 22 Feb 2017 12:22:52 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python-ipython): Update to 5.2.2. [propagated-inputs]: Add pyhon-prompt-toolkit and python-nbformat. --- gnu/packages/python.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 14b99cf4a..9a842cbf7 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4992,17 +4992,18 @@ tools for mocking system commands and recording calls to those.") (define-public python-ipython (package (name "python-ipython") - (version "4.0.3") + (version "5.2.2") (source (origin (method url-fetch) (uri (pypi-uri "ipython" version ".tar.gz")) (sha256 - (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is")))) + (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf")))) (build-system python-build-system) (outputs '("out" "doc")) (propagated-inputs `(("python-pyzmq" ,python-pyzmq) + ("python-prompt-toolkit" ,python-prompt-toolkit) ("python-terminado" ,python-terminado) ("python-matplotlib" ,python-matplotlib) ("python-numpy" ,python-numpy) @@ -5015,6 +5016,7 @@ tools for mocking system commands and recording calls to those.") ("python-jsonschema" ,python-jsonschema) ("python-traitlets" ,python-traitlets) ("python-ipykernel" ,python-ipykernel) + ("python-nbformat" ,python-nbformat) ("python-pygments" ,python-pygments))) (inputs `(("readline" ,readline) @@ -5038,15 +5040,16 @@ tools for mocking system commands and recording calls to those.") (html (string-append doc "/html")) (man1 (string-append data "/man/man1")) (info (string-append data "/info")) - (examples (string-append doc "/examples"))) + (examples (string-append doc "/examples")) + (python-arg (string-append "PYTHON=" (which "python")))) (setenv "LANG" "en_US.utf8") ;; Make installed package available for running the tests (add-installed-pythonpath inputs outputs) (with-directory-excursion "docs" ;; FIXME: pdf fails to build ;;(system* "make" "pdf" "PAPER=a4") - (system* "make" "html") - (system* "make" "info")) + (system* "make" python-arg "html") + (system* "make" python-arg "info")) (copy-recursively "docs/man" man1) (copy-recursively "examples" examples) (copy-recursively "docs/build/html" html) @@ -5100,6 +5103,10 @@ computing.") (arguments `(#:tests? #f ,@(package-arguments ipython))) ;; FIXME: add pyreadline once available. + (propagated-inputs + `(("python2-backports-shutil-get-terminal-size" ,python2-backports-shutil-get-terminal-size) + ("python2-pathlib2" ,python2-pathlib2) + ,@(package-propagated-inputs ipython))) (native-inputs `(("python2-mock" ,python2-mock) ,@(package-native-inputs ipython)))))) -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:36:03 GMT) Full text and rfc822 format available.Message #26 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Wed, 22 Feb 2017 12:22:51 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. [source]: Remove Tk backend patch, use Github instead of Sourceforge. [outputs]: Remove "doc" output. [propagated-inputs]: Add python-cycler. [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. (python-matplotlib-documentation, python2-matplotlib-documentation): New variable. * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/patches/matplotlib-setupext-tk.patch | 34 ------ gnu/packages/python.scm | 142 ++++++++++++---------- 3 files changed, 79 insertions(+), 98 deletions(-) delete mode 100644 gnu/packages/patches/matplotlib-setupext-tk.patch diff --git a/gnu/local.mk b/gnu/local.mk index ca415ec48..13faeeba8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -748,7 +748,6 @@ dist_patch_DATA = \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ - %D%/packages/patches/matplotlib-setupext-tk.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/mcron-install.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ diff --git a/gnu/packages/patches/matplotlib-setupext-tk.patch b/gnu/packages/patches/matplotlib-setupext-tk.patch deleted file mode 100644 index 37c3d686e..000000000 --- a/gnu/packages/patches/matplotlib-setupext-tk.patch +++ /dev/null @@ -1,34 +0,0 @@ -Use 'pkg-config' instead of heuristics to find 'tk' flags. - ---- matplotlib-1.4.3/setupext.py.orig 2015-12-01 14:21:19.554417453 +0100 -+++ matplotlib-1.4.3/setupext.py 2015-12-02 10:39:47.282363530 +0100 -@@ -1457,7 +1457,7 @@ - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, -- executable="/bin/sh", -+ executable="sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') -@@ -1601,8 +1601,19 @@ - # of distros. - - # Query Tcl/Tk system for library paths and version string -+ def getoutput(s): -+ ret = os.popen(s).read().strip() -+ return ret - try: -- tcl_lib_dir, tk_lib_dir, tk_ver = self.query_tcltk() -+ pkg_config_libs = getoutput('pkg-config --libs-only-L tk').split() -+ # drop '-L' part of strings -+ pkg_config_libs = [s[2:] for s in pkg_config_libs] -+ pkg_config_ver = getoutput('pkg-config --modversion tk') -+ tk_ver = re.match(r"(\d+.\d+)[\d.]*", pkg_config_ver).group(1) -+ tcl_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tcl-.*", s)) + '/tcl' + tk_ver -+ tk_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tk-.*", s)) + '/tk' + tk_ver - except: - tk_ver = '' - result = self.hardcoded_tcl_config() diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c45cc9db4..14b99cf4a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3675,21 +3675,20 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") (define-public python-matplotlib (package (name "python-matplotlib") - (version "1.4.3") + (version "2.0.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/matplotlib/matplotlib" - "/matplotlib-" version - "/matplotlib-" version ".tar.gz")) + (uri (string-append + "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av")) - (patches (search-patches "matplotlib-setupext-tk.patch")))) + "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln")))) (build-system python-build-system) - (outputs '("out" "doc")) (propagated-inputs ; the following packages are all needed at run time - `(("python-pyparsing" ,python-pyparsing) + `(("python-cycler" ,python-cycler) + ("python-pyparsing" ,python-pyparsing) ("python-pygobject" ,python-pygobject) ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") @@ -3726,70 +3725,28 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("tk" ,tk))) (native-inputs `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx) - ("python-numpydoc" ,python-numpydoc) ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("texlive" ,texlive) - ("texinfo" ,texinfo))) + ("python-mock" ,python-mock))) (arguments `(#:phases - (alist-cons-before - 'build 'configure-environment - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((cairo (assoc-ref inputs "cairo")) - (gtk+ (assoc-ref inputs "gtk+"))) - ;; Setting these directories in the 'basedirlist' of 'setup.cfg' - ;; has not effect. - (setenv "LD_LIBRARY_PATH" - (string-append cairo "/lib:" gtk+ "/lib")) - (setenv "HOME" (getcwd)) - (call-with-output-file "setup.cfg" + (modify-phases %standard-phases + (add-before 'build 'configure-environment + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((cairo (assoc-ref inputs "cairo")) + (gtk+ (assoc-ref inputs "gtk+"))) + ;; Setting these directories in the 'basedirlist' of 'setup.cfg' + ;; has not effect. + (setenv "LD_LIBRARY_PATH" + (string-append cairo "/lib:" gtk+ "/lib")) + (setenv "HOME" (getcwd)) + (call-with-output-file "setup.cfg" (lambda (port) (format port "[directories]~% basedirlist = ~a,~a~% [rc_options]~% backend = TkAgg~%" (assoc-ref inputs "tcl") - (assoc-ref inputs "tk")))))) - (alist-cons-after - 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (info (string-append data "/info")) - (html (string-append doc "/html"))) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "doc" - ;; Produce pdf in 'A4' format. - (substitute* (find-files "." "conf\\.py") - (("latex_paper_size = 'letter'") - "latex_paper_size = 'a4'")) - (mkdir-p html) - (mkdir-p info) - ;; The doc recommends to run the 'html' target twice. - (system* "python" "make.py" "html") - (system* "python" "make.py" "html") - (copy-recursively "build/html" html) - (system* "python" "make.py" "latex") - (system* "python" "make.py" "texinfo") - (symlink (string-append html "/_images") - (string-append info "/matplotlib-figures")) - (with-directory-excursion "build/texinfo" - (substitute* "matplotlib.texi" - (("@image\\{([^,]*)" all file) - (string-append "@image{matplotlib-figures/" file))) - (symlink (string-append html "/_images") - "./matplotlib-figures") - (system* "makeinfo" "--no-split" - "-o" "matplotlib.info" "matplotlib.texi")) - (copy-file "build/texinfo/matplotlib.info" - (string-append info "/matplotlib.info")) - (copy-file "build/latex/Matplotlib.pdf" - (string-append doc "/Matplotlib.pdf"))))) - %standard-phases)))) + (assoc-ref inputs "tk")))))))))) (home-page "http://matplotlib.org") (synopsis "2D plotting library for Python") (description @@ -3814,6 +3771,65 @@ toolkits.") ,@(fold alist-delete (package-propagated-inputs matplotlib) '("python-pycairo" "python-pygobject" "python-tkinter"))))))) +(define-public python-matplotlib-documentation + (package + (inherit python-matplotlib) + (name "python-matplotlib-documentation") + (native-inputs + `(("python-colorspacious" ,python-colorspacious) + ("python-sphinx" ,python-sphinx) + ("python-numpydoc" ,python-numpydoc) + ("python-ipython" ,python-ipython) + ("texlive" ,texlive) + ("texinfo" ,texinfo) + ,@(package-native-inputs python-matplotlib))) + (arguments + `(#:tests? #f ; we're only generating documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append data "/doc/" ,name "-" + ,(package-version python-matplotlib))) + (info (string-append data "/info")) + (html (string-append doc "/html"))) + ;; Make installed package available for building the + ;; documentation + (with-directory-excursion "doc" + ;; Produce pdf in 'A4' format. + (substitute* (find-files "." "conf\\.py") + (("latex_paper_size = 'letter'") + "latex_paper_size = 'a4'")) + (mkdir-p html) + (mkdir-p info) + ;; The doc recommends to run the 'html' target twice. + (system* "python" "make.py" "html") + (system* "python" "make.py" "html") + (copy-recursively "build/html" html) + (system* "python" "make.py" "latex") + (system* "python" "make.py" "texinfo") + (symlink (string-append html "/_images") + (string-append info "/matplotlib-figures")) + (with-directory-excursion "build/texinfo" + (substitute* "matplotlib.texi" + (("@image\\{([^,]*)" all file) + (string-append "@image{matplotlib-figures/" file))) + (symlink (string-append html "/_images") + "./matplotlib-figures") + (system* "makeinfo" "--no-split" + "-o" "matplotlib.info" "matplotlib.texi")) + (copy-file "build/texinfo/matplotlib.info" + (string-append info "/matplotlib.info")) + (copy-file "build/latex/Matplotlib.pdf" + (string-append doc "/Matplotlib.pdf"))))))))) + (synopsis "Documentation for the python-matplotlib package"))) + +(define-public python2-matplotlib-documentation + (package-with-python2 python-matplotlib-documentation)) + (define-public python2-pysnptools (package (name "python2-pysnptools") -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Wed, 22 Feb 2017 16:36:04 GMT) Full text and rfc822 format available.Message #29 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> To: 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: [PATCH 7/7] gnu: python-scipy: Update to 0.18.1. Date: Wed, 22 Feb 2017 12:22:53 +0100
From: Thomas Danckaert <post <at> thomasdanckaert.be> * gnu/packages/python.scm (python-scipy): Update to 0.18.1. [source]: Use github instead of sourceforge. [native-inputs]: Add python-cython. --- gnu/packages/python.scm | 113 +++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 60 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9a842cbf7..0b60d4926 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3900,16 +3900,16 @@ functions.") (define-public python-scipy (package (name "python-scipy") - (version "0.16.0") + (version "0.18.1") (source (origin (method url-fetch) -; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz - (uri (string-append "mirror://sourceforge/scipy/scipy/" version - "/scipy-" version ".tar.xz")) + (uri (string-append "https://github.com/scipy/scipy/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2")))) + "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn")))) (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy) @@ -3919,22 +3919,22 @@ functions.") `(("lapack" ,lapack) ("openblas" ,openblas))) (native-inputs - `(("python-nose" ,python-nose) + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("gfortran" ,gfortran) - ("texlive" ,texlive) ("perl" ,perl))) (outputs '("out" "doc")) (arguments `(#:phases - (alist-cons-before - 'build 'configure-openblas - (lambda* (#:key inputs #:allow-other-keys) - (call-with-output-file "site.cfg" - (lambda (port) - (format port - "[blas] + (modify-phases %standard-phases + (add-before 'build 'configure-openblas + (lambda* (#:key inputs #:allow-other-keys) + (call-with-output-file "site.cfg" + (lambda (port) + (format port + "[blas] libraries = openblas library_dirs = ~a/lib include_dirs = ~a/include @@ -3944,53 +3944,46 @@ include_dirs = ~a/include library_dirs = ~a/lib atlas_libs = openblas " - (assoc-ref inputs "openblas") - (assoc-ref inputs "openblas") - (assoc-ref inputs "openblas")))) - #t) - (alist-cons-after - 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (html (string-append doc "/html")) - (pyver ,(string-append "PYVER="))) - ;; Make installed package available for building the - ;; documentation + (assoc-ref inputs "openblas") + (assoc-ref inputs "openblas") + (assoc-ref inputs "openblas")))) + #t)) + (add-after 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (doc (string-append data "/doc/" ,name "-" ,version)) + (html (string-append doc "/html")) + (pyver ,(string-append "PYVER="))) + ;; Make installed package available for building the + ;; documentation + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "doc" + ;; Fix generation of images for mathematical expressions. + (substitute* (find-files "source" "conf\\.py") + (("pngmath_use_preview = True") + "pngmath_use_preview = False")) + (mkdir-p html) + (system* "make" "html" pyver) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (install-file file html))) + (find-files "." ".*"))))))) + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "scipy/integrate/tests/test_quadpack.py" + (("libm.so") "libm.so.6")) + #t)) + ;; Tests can only be run after the library has been installed and not + ;; within the source directory. + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) (add-installed-pythonpath inputs outputs) - (with-directory-excursion "doc" - ;; Fix generation of images for mathematical expressions. - (substitute* (find-files "source" "conf\\.py") - (("pngmath_use_preview = True") - "pngmath_use_preview = False")) - (mkdir-p html) - (system* "make" "html" pyver) - (system* "make" "latex" "PAPER=a4" pyver) - (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver) - (copy-file "build/latex/scipy-ref.pdf" - (string-append doc "/scipy-ref.pdf")) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (install-file file html))) - (find-files "." ".*")))))) - ;; Tests can only be run after the library has been installed and not - ;; within the source directory. - (alist-cons-after - 'install 'check - (lambda _ - (with-directory-excursion "/tmp" - (zero? (system* "python" "-c" "import scipy; scipy.test()")))) - (alist-delete - 'check - (alist-cons-after - 'unpack 'fix-tests - (lambda _ - (substitute* "scipy/integrate/tests/test_quadpack.py" - (("libm.so") "libm.so.6")) - #t) - %standard-phases))))))) + (with-directory-excursion "/tmp" + (zero? (system* "python" "-c" + "import scipy; scipy.test('full', 2)")))))))) (home-page "http://www.scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Thu, 23 Feb 2017 08:50:02 GMT) Full text and rfc822 format available.Message #32 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: 25834 <at> debbugs.gnu.org Cc: post <at> thomasdanckaert.be Subject: Re: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Thu, 23 Feb 2017 09:48:46 +0100 (CET)
[Message part 1 (text/plain, inline)]
From: Thomas Danckaert <thomas.danckaert <at> gmail.com> Subject: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Wed, 22 Feb 2017 12:22:51 +0100 > From: Thomas Danckaert <post <at> thomasdanckaert.be> > > * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. > [source]: Remove Tk backend patch, use Github instead of Sourceforge. > [outputs]: Remove "doc" output. > [propagated-inputs]: Add python-cycler. > [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. > (python-matplotlib-documentation, python2-matplotlib-documentation): New > variable. > * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. > * gnu/local.mk (dist_patch_DATA): Remove patch. I send an updated patch because I've realized that we now have python-qt as well. Adding python-qt enables the Qt5Agg backend (interactive plotting widget using Qt). I'm not sure if it should be a propagated input, though. With python-qt as a regular input, the users have to install python-qt into their profile if they want to use the Qt5Agg backend. When you ask matplotlib to use Qt5Agg but don't have python-qt in your profile, you get the following error: > ImportError: Matplotlib qt-based backends require an external PyQt4, > PyQt5, or PySide package to be installed, but it was not found. This is unlike the TkAgg backend (similar plotting widget using Tk), which is available immediately (I think because of the propagated python-tkinter). Is this OK, or do we want to propagate python-qt as well so everything works immediately? The GtkAgg backend seems work automatically when in Gnome shell, but not in xfce4 (and the error message is not helpful). My guess is that something is missing from $GI_TYPELIB_PATH in xfce4. In a Gnome session, $GI_TYPELIB_PATH contains a big list of entries, while in an xfce4, it only contains ${HOME}/.guix-profile/lib/girepository-1.0. Thomas
[0001-gnu-python-matplotlib-Update-to-2.0.0.patch (text/x-patch, inline)]
From 548df3e2ee7288be93146d7164e8e0c37ce21ce8 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 22:18:45 +0100 Subject: [PATCH] gnu: python-matplotlib: Update to 2.0.0. * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. [source]: Remove Tk backend patch, use Github instead of Sourceforge. [outputs]: Remove "doc" output. [inputs]: Add python-pyqt. [propagated-inputs]: Add python-cycler. [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. (python-matplotlib-documentation, python2-matplotlib-documentation): New variables. * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/patches/matplotlib-setupext-tk.patch | 34 ----- gnu/packages/python.scm | 144 ++++++++++++---------- 3 files changed, 80 insertions(+), 99 deletions(-) delete mode 100644 gnu/packages/patches/matplotlib-setupext-tk.patch diff --git a/gnu/local.mk b/gnu/local.mk index ca415ec48..13faeeba8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -748,7 +748,6 @@ dist_patch_DATA = \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ - %D%/packages/patches/matplotlib-setupext-tk.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/mcron-install.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ diff --git a/gnu/packages/patches/matplotlib-setupext-tk.patch b/gnu/packages/patches/matplotlib-setupext-tk.patch deleted file mode 100644 index 37c3d686e..000000000 --- a/gnu/packages/patches/matplotlib-setupext-tk.patch +++ /dev/null @@ -1,34 +0,0 @@ -Use 'pkg-config' instead of heuristics to find 'tk' flags. - ---- matplotlib-1.4.3/setupext.py.orig 2015-12-01 14:21:19.554417453 +0100 -+++ matplotlib-1.4.3/setupext.py 2015-12-02 10:39:47.282363530 +0100 -@@ -1457,7 +1457,7 @@ - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, -- executable="/bin/sh", -+ executable="sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') -@@ -1601,8 +1601,19 @@ - # of distros. - - # Query Tcl/Tk system for library paths and version string -+ def getoutput(s): -+ ret = os.popen(s).read().strip() -+ return ret - try: -- tcl_lib_dir, tk_lib_dir, tk_ver = self.query_tcltk() -+ pkg_config_libs = getoutput('pkg-config --libs-only-L tk').split() -+ # drop '-L' part of strings -+ pkg_config_libs = [s[2:] for s in pkg_config_libs] -+ pkg_config_ver = getoutput('pkg-config --modversion tk') -+ tk_ver = re.match(r"(\d+.\d+)[\d.]*", pkg_config_ver).group(1) -+ tcl_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tcl-.*", s)) + '/tcl' + tk_ver -+ tk_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tk-.*", s)) + '/tk' + tk_ver - except: - tk_ver = '' - result = self.hardcoded_tcl_config() diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c45cc9db4..cae01b841 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3675,21 +3675,20 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") (define-public python-matplotlib (package (name "python-matplotlib") - (version "1.4.3") + (version "2.0.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/matplotlib/matplotlib" - "/matplotlib-" version - "/matplotlib-" version ".tar.gz")) + (uri (string-append + "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av")) - (patches (search-patches "matplotlib-setupext-tk.patch")))) + "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln")))) (build-system python-build-system) - (outputs '("out" "doc")) (propagated-inputs ; the following packages are all needed at run time - `(("python-pyparsing" ,python-pyparsing) + `(("python-cycler" ,python-cycler) + ("python-pyparsing" ,python-pyparsing) ("python-pygobject" ,python-pygobject) ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") @@ -3721,75 +3720,33 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("glib" ,glib) ;; FIXME: Add backends when available. ;("python-wxpython" ,python-wxpython) - ;("python-pyqt" ,python-pyqt) + ("python-pyqt" ,python-pyqt) ("tcl" ,tcl) ("tk" ,tk))) (native-inputs `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx) - ("python-numpydoc" ,python-numpydoc) ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("texlive" ,texlive) - ("texinfo" ,texinfo))) + ("python-mock" ,python-mock))) (arguments `(#:phases - (alist-cons-before - 'build 'configure-environment - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((cairo (assoc-ref inputs "cairo")) - (gtk+ (assoc-ref inputs "gtk+"))) - ;; Setting these directories in the 'basedirlist' of 'setup.cfg' - ;; has not effect. - (setenv "LD_LIBRARY_PATH" - (string-append cairo "/lib:" gtk+ "/lib")) - (setenv "HOME" (getcwd)) - (call-with-output-file "setup.cfg" + (modify-phases %standard-phases + (add-before 'build 'configure-environment + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((cairo (assoc-ref inputs "cairo")) + (gtk+ (assoc-ref inputs "gtk+"))) + ;; Setting these directories in the 'basedirlist' of 'setup.cfg' + ;; has not effect. + (setenv "LD_LIBRARY_PATH" + (string-append cairo "/lib:" gtk+ "/lib")) + (setenv "HOME" (getcwd)) + (call-with-output-file "setup.cfg" (lambda (port) (format port "[directories]~% basedirlist = ~a,~a~% [rc_options]~% backend = TkAgg~%" (assoc-ref inputs "tcl") - (assoc-ref inputs "tk")))))) - (alist-cons-after - 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (info (string-append data "/info")) - (html (string-append doc "/html"))) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "doc" - ;; Produce pdf in 'A4' format. - (substitute* (find-files "." "conf\\.py") - (("latex_paper_size = 'letter'") - "latex_paper_size = 'a4'")) - (mkdir-p html) - (mkdir-p info) - ;; The doc recommends to run the 'html' target twice. - (system* "python" "make.py" "html") - (system* "python" "make.py" "html") - (copy-recursively "build/html" html) - (system* "python" "make.py" "latex") - (system* "python" "make.py" "texinfo") - (symlink (string-append html "/_images") - (string-append info "/matplotlib-figures")) - (with-directory-excursion "build/texinfo" - (substitute* "matplotlib.texi" - (("@image\\{([^,]*)" all file) - (string-append "@image{matplotlib-figures/" file))) - (symlink (string-append html "/_images") - "./matplotlib-figures") - (system* "makeinfo" "--no-split" - "-o" "matplotlib.info" "matplotlib.texi")) - (copy-file "build/texinfo/matplotlib.info" - (string-append info "/matplotlib.info")) - (copy-file "build/latex/Matplotlib.pdf" - (string-append doc "/Matplotlib.pdf"))))) - %standard-phases)))) + (assoc-ref inputs "tk")))))))))) (home-page "http://matplotlib.org") (synopsis "2D plotting library for Python") (description @@ -3814,6 +3771,65 @@ toolkits.") ,@(fold alist-delete (package-propagated-inputs matplotlib) '("python-pycairo" "python-pygobject" "python-tkinter"))))))) +(define-public python-matplotlib-documentation + (package + (inherit python-matplotlib) + (name "python-matplotlib-documentation") + (native-inputs + `(("python-colorspacious" ,python-colorspacious) + ("python-sphinx" ,python-sphinx) + ("python-numpydoc" ,python-numpydoc) + ("python-ipython" ,python-ipython) + ("texlive" ,texlive) + ("texinfo" ,texinfo) + ,@(package-native-inputs python-matplotlib))) + (arguments + `(#:tests? #f ; we're only generating documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append data "/doc/" ,name "-" + ,(package-version python-matplotlib))) + (info (string-append data "/info")) + (html (string-append doc "/html"))) + ;; Make installed package available for building the + ;; documentation + (with-directory-excursion "doc" + ;; Produce pdf in 'A4' format. + (substitute* (find-files "." "conf\\.py") + (("latex_paper_size = 'letter'") + "latex_paper_size = 'a4'")) + (mkdir-p html) + (mkdir-p info) + ;; The doc recommends to run the 'html' target twice. + (system* "python" "make.py" "html") + (system* "python" "make.py" "html") + (copy-recursively "build/html" html) + (system* "python" "make.py" "latex") + (system* "python" "make.py" "texinfo") + (symlink (string-append html "/_images") + (string-append info "/matplotlib-figures")) + (with-directory-excursion "build/texinfo" + (substitute* "matplotlib.texi" + (("@image\\{([^,]*)" all file) + (string-append "@image{matplotlib-figures/" file))) + (symlink (string-append html "/_images") + "./matplotlib-figures") + (system* "makeinfo" "--no-split" + "-o" "matplotlib.info" "matplotlib.texi")) + (copy-file "build/texinfo/matplotlib.info" + (string-append info "/matplotlib.info")) + (copy-file "build/latex/Matplotlib.pdf" + (string-append doc "/Matplotlib.pdf"))))))))) + (synopsis "Documentation for the python-matplotlib package"))) + +(define-public python2-matplotlib-documentation + (package-with-python2 python-matplotlib-documentation)) + (define-public python2-pysnptools (package (name "python2-pysnptools") -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Thu, 23 Feb 2017 13:22:02 GMT) Full text and rfc822 format available.Message #35 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <thomas.danckaert <at> gmail.com>, 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: Re: bug#25834: [PATCH 1/7] gnu: Add python2-backports-shutil-get-terminal-size. Date: Thu, 23 Feb 2017 14:21:30 +0100
[Message part 1 (text/plain, inline)]
Thomas Danckaert <thomas.danckaert <at> gmail.com> writes: > From: Thomas Danckaert <post <at> thomasdanckaert.be> > > * gnu/packages/python.scm (python2-backports-shutil-get-terminal-size): New > variable. [...] > +(define-public python2-backports-shutil-get-terminal-size > + (package-with-python2 The "package-with-python" procedure expects to get a py3 equipped package as argument. For python2-only packages, I prefer to have the inputs explicitly set to the python2 variants. > + (package > + (name "python-backports-shutil-get-terminal-size") python2* > + (version "1.0.0") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "https://pypi.python.org/packages/ec/9c/" > + "368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/" > + "backports.shutil_get_terminal_size-" version ".tar.gz")) Is it possible to use 'pypi-uri' here? > + (sha256 > + (base32 > + "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) > + (build-system python-build-system) > + (home-page > + "https://github.com/chrippa/backports.shutil_get_terminal_size") > + (synopsis > + "Backport of Python 3.3's @code{shutil.get_terminal_size()}") I don't think Texinfo syntax is supported in synopses. See e.g. https://www.gnu.org/software/guix/packages/r.html#ruby-minitest-bonus-assertions > + (description > + "A backport of the get_terminal_size function from Python 3.3's shutil. > +Unlike the original version it is written in pure Python rather than C, so it > +might be a tiny bit slower.") Here "get_terminal_size" and "shutil" would be clearer with an @code{} wrapper IMO. Otherwise LGTM. > + (license license:expat)))) > + > (define-public python-waf > (package > (name "python-waf") > -- > 2.11.1
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Thu, 23 Feb 2017 13:24:01 GMT) Full text and rfc822 format available.Message #38 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <thomas.danckaert <at> gmail.com>, 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: Re: bug#25834: [PATCH 3/7] gnu: python-sphinx: Update to 1.5.2. Date: Thu, 23 Feb 2017 14:23:17 +0100
[Message part 1 (text/plain, inline)]
Thomas Danckaert <thomas.danckaert <at> gmail.com> writes: > From: Thomas Danckaert <post <at> thomasdanckaert.be> > > * gnu/packages/python.scm (python-sphinx): Update to 1.5.2. > [propagated-inputs]: Add python-sphinx-alabaster-theme, > python-sphinx-rtd-theme, python-babel, python-requests, > python-snowballstemmer and python-imagesize. We already have sphinx 1.5.1 in 'python-tests'. In fact you should probably base this series off it!
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Thu, 23 Feb 2017 13:27:02 GMT) Full text and rfc822 format available.Message #41 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <post <at> thomasdanckaert.be>, 25834 <at> debbugs.gnu.org Cc: post <at> thomasdanckaert.be Subject: Re: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Thu, 23 Feb 2017 14:26:52 +0100
[Message part 1 (text/plain, inline)]
Thomas Danckaert <post <at> thomasdanckaert.be> writes: > From: Thomas Danckaert <thomas.danckaert <at> gmail.com> > Subject: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. > Date: Wed, 22 Feb 2017 12:22:51 +0100 > >> From: Thomas Danckaert <post <at> thomasdanckaert.be> >> >> * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. >> [source]: Remove Tk backend patch, use Github instead of Sourceforge. >> [outputs]: Remove "doc" output. >> [propagated-inputs]: Add python-cycler. >> [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. >> (python-matplotlib-documentation, python2-matplotlib-documentation): New >> variable. >> * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. >> * gnu/local.mk (dist_patch_DATA): Remove patch. > > I send an updated patch because I've realized that we now have python-qt as well. Adding python-qt enables the Qt5Agg backend (interactive plotting widget using Qt). > > I'm not sure if it should be a propagated input, though. With > python-qt as a regular input, the users have to install python-qt into > their profile if they want to use the Qt5Agg backend. When you ask matplotlib to use Qt5Agg but don't have python-qt in your profile, you get the following error: > >> ImportError: Matplotlib qt-based backends require an external PyQt4, >> PyQt5, or PySide package to be installed, but it was not found. > > This is unlike the TkAgg backend (similar plotting widget using Tk), > which is available immediately (I think because of the propagated > python-tkinter). Is this OK, or do we want to propagate python-qt as > well so everything works immediately? Pulling in Qt for matplotlib sounds a bit much. Since it supports three different qt backends and handles them missing gracefully, I think it's better to leave this choice to the user.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Fri, 24 Feb 2017 10:22:02 GMT) Full text and rfc822 format available.Message #44 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: mbakke <at> fastmail.com Cc: 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH 3/7] gnu: python-sphinx: Update to 1.5.2. Date: Fri, 24 Feb 2017 11:21:30 +0100 (CET)
From: Marius Bakke <mbakke <at> fastmail.com> Subject: Re: bug#25834: [PATCH 3/7] gnu: python-sphinx: Update to 1.5.2. Date: Thu, 23 Feb 2017 14:23:17 +0100 >> From: Thomas Danckaert <post <at> thomasdanckaert.be> >> >> * gnu/packages/python.scm (python-sphinx): Update to 1.5.2. >> [propagated-inputs]: Add python-sphinx-alabaster-theme, >> python-sphinx-rtd-theme, python-babel, python-requests, >> python-snowballstemmer and python-imagesize. > > We already have sphinx 1.5.1 in 'python-tests'. In fact you should > probably base this series off it! Ok. I have an updated patch series based on python-tests (+your “add cycler” commit). Do you have further comments the other patches, or shall I send the new patchseries (maybe as a single attachment to not pollute the list unnecessarily?). Thomas
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Fri, 24 Feb 2017 10:42:02 GMT) Full text and rfc822 format available.Message #47 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <post <at> thomasdanckaert.be> Cc: 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH 3/7] gnu: python-sphinx: Update to 1.5.2. Date: Fri, 24 Feb 2017 11:41:31 +0100
[Message part 1 (text/plain, inline)]
Thomas Danckaert <post <at> thomasdanckaert.be> writes: > From: Marius Bakke <mbakke <at> fastmail.com> > Subject: Re: bug#25834: [PATCH 3/7] gnu: python-sphinx: Update to > 1.5.2. > Date: Thu, 23 Feb 2017 14:23:17 +0100 > >>> From: Thomas Danckaert <post <at> thomasdanckaert.be> >>> >>> * gnu/packages/python.scm (python-sphinx): Update to 1.5.2. >>> [propagated-inputs]: Add python-sphinx-alabaster-theme, >>> python-sphinx-rtd-theme, python-babel, python-requests, >>> python-snowballstemmer and python-imagesize. >> >> We already have sphinx 1.5.1 in 'python-tests'. In fact you should >> probably base this series off it! > > Ok. I have an updated patch series based on python-tests (+your “add > cycler” commit). Do you have further comments the other patches, or > shall I send the new patchseries (maybe as a single attachment to not > pollute the list unnecessarily?). The only comment I have on the colorspacious commit is that a line is too long. Didn't read the updates thoroughly due to the mix of using modify-phases; but will do so next time around. Single file is great! Thank you!
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 27 Feb 2017 09:56:02 GMT) Full text and rfc822 format available.Message #50 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: mbakke <at> fastmail.com, 25834 <at> debbugs.gnu.org Subject: bug#25834: [PATCH] Update scipy stack. Date: Mon, 27 Feb 2017 10:54:36 +0100 (CET)
[Message part 1 (text/plain, inline)]
Hi, here's a new and improved patch series, on top of the python-tests branch. It also needs python-cycler, which is currently only in master (cherry-picked commit included here for convenience). some comments: 1) matplotlib-documentation/numpy-documentation: I decided not to use “(inherits ...)” because - it got messy for matplotlib, where I think the “python2-variant” of the base matplotlib package interfered when trying to (package-with-python2 matplotlib-documentation), and - all of the input fields need to be rewritten anyway (the documentation packages only need a number of native inputs). 2) Building the latex version of scipy's documentation now fails due to missing unicode characters and a lot of unescaped inline math formulas, which are upstream issues IMO (I'll submit an issue on their github page). 3) From: Marius Bakke <mbakke <at> fastmail.com> Date: Thu, 23 Feb 2017 14:21:30 +0100 >> + (source >> + (origin >> + (method url-fetch) >> + (uri (string-append >> + "https://pypi.python.org/packages/ec/9c/" >> + >> "368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/" >> + "backports.shutil_get_terminal_size-" version >> ".tar.gz")) > > Is it possible to use 'pypi-uri' here? I couldn't find a working pypi-uri, having tried all sorts of combinations of “backports.shutil-get-terminal-size” or “backports-shutil-get-terminal-size” (is there some sort of trick to find these? These simple urls are never listed on pypi, is my impression.). 4) I removed the patch related to the Matplotlib Tk backend, because it now seems to work just fine without it. But maybe I misunderstand the reason the patch was there... comments? cheers, Thomas
[update-scipy.patch (text/x-patch, inline)]
From 556764c10272b412b0b1aad26429be563bc711e3 Mon Sep 17 00:00:00 2001 From: Marius Bakke <mbakke <at> fastmail.com> Date: Thu, 19 Jan 2017 18:35:18 +0100 Subject: [PATCH 1/9] gnu: Add python-cycler. * gnu/packages/python.scm (python-cycler, python2-cycler): New variables. --- gnu/packages/python.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index e26e442e5..9d1996314 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3733,6 +3733,36 @@ transcendental functions).") (define-public python2-numexpr (package-with-python2 python-numexpr)) +(define-public python-cycler + (package + (name "python-cycler") + (version "0.10.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "cycler" version)) + (sha256 + (base32 + "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd")))) + (build-system python-build-system) + (arguments + ;; XXX: The current version requires 'coveralls' which we don't have. + ;; Enable this for the next release which uses 'python-pytest'. + '(#:tests? #f)) + (propagated-inputs + `(("python-six" ,python-six))) + (home-page "http://matplotlib.org/cycler/") + (synopsis "Composable keyword argument iterator") + (description + "When using @code{matplotlib} and plotting more than one line, it is +common to want to be able to want to be able to cycle over one or more artist +styles; but the plotting logic can quickly become involved. +To address this and enable easy cycling over arbitrary @code{kwargs}, the +@code{Cycler} class was developed.") + (license license:bsd-3))) + +(define-public python2-cycler + (package-with-python2 python-cycler)) + (define-public python-matplotlib (package (name "python-matplotlib") -- 2.11.1 From 9f229fce352b60c194c7300d9efe65d5e73e60f5 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 13:33:20 +0100 Subject: [PATCH 2/9] gnu: Add python2-backports-shutil-get-terminal-size. * gnu/packages/python.scm (python2-backports-shutil-get-terminal-size): New variable. --- gnu/packages/python.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9d1996314..54c870d63 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -33,7 +33,7 @@ ;;; Copyright © 2016 Arun Isaac <arunisaac <at> systemreboot.net> ;;; Copyright © 2016, 2017 Julien Lepiller <julien <at> lepiller.eu> ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me <at> tobias.gr> -;;; Copyright © 2016 Thomas Danckaert <post <at> thomasdanckaert.be> +;;; Copyright © 2016, 2017 Thomas Danckaert <post <at> thomasdanckaert.be> ;;; Copyright © 2017 Carlo Zancanaro <carlo <at> zancanaro.id.au> ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis <at> gmail.com> ;;; @@ -6024,6 +6024,33 @@ connection to each user.") (define-public python2-backports-abc (package-with-python2 python-backports-abc)) +(define-public python2-backports-shutil-get-terminal-size + (package + (name "python2-backports-shutil-get-terminal-size") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/ec/9c/" + "368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/" + "backports.shutil_get_terminal_size-" version ".tar.gz")) + (sha256 + (base32 + "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2)) + (home-page + "https://github.com/chrippa/backports.shutil_get_terminal_size") + (synopsis + "Backport of Python 3.3's shutil.get_terminal_size") + (description + "A backport of the @code{get_terminal_size function} from Python 3.3's @code{shutil}. +Unlike the original version it is written in pure Python rather than C, so it +might be a tiny bit slower.") + (license license:expat))) + (define-public python-waf (package (name "python-waf") -- 2.11.1 From 49cc81a88f80b2e48ee248221b1b290f6bfaf64a Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 21:33:02 +0100 Subject: [PATCH 3/9] gnu: Add python-colorspacious. * gnu/packages/python.scm (python-colorspacious, python2-colorspacious): New variables. --- gnu/packages/python.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 54c870d63..bab5f85e4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3763,6 +3763,31 @@ To address this and enable easy cycling over arbitrary @code{kwargs}, the (define-public python2-cycler (package-with-python2 python-cycler)) +(define-public python-colorspacious + (package + (name "python-colorspacious") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/njsmith/colorspacious/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version)) + (sha256 + (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k")))) + (build-system python-build-system) + (propagated-inputs + `(("python-numpy" ,python-numpy))) + (home-page "https://github.com/njsmith/colorspacious") + (synopsis "Python library for colorspace conversions") + (description "Colorspacious is a Python library that lets you easily convert +between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") + (license license:expat))) + +(define-public python2-colorspacious + (package-with-python2 python-colorspacious)) + (define-public python-matplotlib (package (name "python-matplotlib") -- 2.11.1 From 70f5cbbab305dbf13a8c1c6215dd24e99bb62684 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 20:28:27 +0100 Subject: [PATCH 4/9] gnu: python-numpy: Update to 1.12.0. * gnu/packages/python.scm (python-numpy): Update to 1.12.0. [source]: Use github instead of sourceforge. [native-inputs]: Add python-cython. To simplify the handling of dependency cycles (numpy documentation depends on matplotlib, which depends on numpy), we split out the documentation into a separate package: (python-numpy-bootstrap, python2-numpy-bootstrap): Remove variables. (python-numpy-documentation, python2-numpy-documentation): New variables. --- gnu/packages/python.scm | 148 +++++++++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 66 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index bab5f85e4..4f1359324 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3402,24 +3402,26 @@ between language specification and implementation aspects.") ;; This version of numpy is missing the documentation and is only used to ;; build matplotlib which is required to build numpy's documentation. -(define python-numpy-bootstrap +(define-public python-numpy (package - (name "python-numpy-bootstrap") - (version "1.10.4") + (name "python-numpy") + (version "1.12.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/numpy/NumPy/" version - "/numpy-" version ".tar.gz")) + (uri (string-append + "https://github.com/numpy/numpy/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp")))) + "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d")))) (build-system python-build-system) (inputs `(("openblas" ,openblas) ("lapack" ,lapack))) (native-inputs - `(("python-nose" ,python-nose) + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) ("gfortran" ,gfortran))) (arguments `(#:phases @@ -3468,8 +3470,8 @@ and Fortran code, useful linear algebra, Fourier transform, and random number capabilities.") (license license:bsd-3))) -(define python2-numpy-bootstrap - (package-with-python2 python-numpy-bootstrap)) +(define-public python2-numpy + (package-with-python2 python-numpy)) (define-public python-munch (package @@ -3526,69 +3528,83 @@ Models, is a program for performing both single-SNP and SNP-set genome-wide association studies (GWAS) on extremely large data sets.") (license license:asl2.0))) -(define-public python-numpy - (package (inherit python-numpy-bootstrap) - (name "python-numpy") - (outputs '("out" "doc")) - (inputs - `(("which" ,which) - ,@(package-inputs python-numpy-bootstrap))) - (propagated-inputs - `(("python-matplotlib" ,python-matplotlib) - ("python-pyparsing" ,python-pyparsing) - ,@(package-propagated-inputs python-numpy-bootstrap))) +(define-public python-numpy-documentation + (package + (name "python-numpy-documentation") + (version (package-version python-numpy)) + (source (package-source python-numpy)) + (build-system python-build-system) (native-inputs - `(("pkg-config" ,pkg-config) + `(("python-matplotlib" ,python-matplotlib) + ("python-numpy" ,python-numpy) + ("pkg-config" ,pkg-config) ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("texlive" ,texlive) ("texinfo" ,texinfo) ("perl" ,perl) - ,@(package-native-inputs python-numpy-bootstrap))) - (arguments - `(,@(substitute-keyword-arguments - (package-arguments python-numpy-bootstrap) - ((#:phases phases) - `(alist-cons-after - 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append - data "/doc/" ,name "-" - ,(package-version python-numpy-bootstrap))) - (info (string-append data "/info")) - (html (string-append doc "/html")) - (pyver ,(string-append "PYVER="))) - (with-directory-excursion "doc" - (mkdir-p html) - (system* "make" "html" pyver) - (system* "make" "latex" "PAPER=a4" pyver) - (system* "make" "-C" "build/latex" - "all-pdf" "PAPER=a4" pyver) - ;; FIXME: Generation of the info file fails. - ;; (system* "make" "info" pyver) - ;; (mkdir-p info) - ;; (copy-file "build/texinfo/numpy.info" - ;; (string-append info "/numpy.info")) - (for-each (lambda (file) - (copy-file (string-append "build/latex" file) - (string-append doc file))) - '("/numpy-ref.pdf" "/numpy-user.pdf")) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (unless (equal? "." dir) - (mkdir-p tgt-dir)) - (install-file file html))) - (find-files "." ".*")))))) - ,phases))))))) + ("scipy-sphinx-theme" + ,(origin ; The build script expects scipy-sphinx-theme as a git submodule + (method git-fetch) + (uri (git-reference + (url "https://github.com/scipy/scipy-sphinx-theme.git") + (commit "c466764e22"))) + (sha256 + (base32 + "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) + ,@(package-native-inputs python-numpy))) + (arguments + `(#:tests? #f ; we're only generating the documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append + data "/doc/" ,name "-" + ,(package-version python-numpy))) + (info-reader (string-append data "/info")) + (html (string-append doc "/html")) + (scipy-sphinx-theme "scipy-sphinx-theme") + (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) + (pyver ,(string-append "PYVER="))) + (with-directory-excursion "doc" + (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) + (mkdir-p html) + (system* "make" "html" pyver) + (system* "make" "latex" "PAPER=a4" pyver) + (system* "make" "-C" "build/latex" + "all-pdf" "PAPER=a4" pyver) + ;; FIXME: Generation of the info file fails. + ;; (system* "make" "info" pyver) + ;; (mkdir-p info) + ;; (copy-file "build/texinfo/numpy.info" + ;; (string-append info "/numpy.info")) + (for-each (lambda (file) + (copy-file (string-append "build/latex" file) + (string-append doc file))) + '("/numpy-ref.pdf" "/numpy-user.pdf")) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (unless (equal? "." dir) + (mkdir-p tgt-dir)) + (install-file file html))) + (find-files "." ".*"))))) + #t))))) + (home-page (package-home-page python-numpy)) + (synopsis "Documentation for the python-numpy package") + (description (package-description python-numpy)) + (license (package-license python-numpy)))) -(define-public python2-numpy - (package-with-python2 python-numpy)) +(define-public python2-numpy-documentation + (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) + (package + (inherit numpy-documentation) + (native-inputs `(("python2-functools32" ,python2-functools32) + ,@(package-native-inputs numpy-documentation)))))) (define-public python-pygit2 (package @@ -3810,7 +3826,7 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") ("python-dateutil" ,python-dateutil) - ("python-numpy" ,python-numpy-bootstrap) + ("python-numpy" ,python-numpy) ("python-pillow" ,python-pillow) ("python-pytz" ,python-pytz) ("python-six" ,python-six) -- 2.11.1 From c766e974d5e785b0940a588687986de79f98fede Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 22:18:45 +0100 Subject: [PATCH 5/9] gnu: python-matplotlib: Update to 2.0.0. * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. [source]: Remove Tk backend patch, use Github instead of Sourceforge. [outputs]: Remove "doc" output. [inputs]: Add python-pyqt. [propagated-inputs]: Add python-cycler. [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. (python-matplotlib-documentation, python2-matplotlib-documentation): New variables. * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/patches/matplotlib-setupext-tk.patch | 34 ------- gnu/packages/python.scm | 118 ++++++++++++---------- 3 files changed, 67 insertions(+), 86 deletions(-) delete mode 100644 gnu/packages/patches/matplotlib-setupext-tk.patch diff --git a/gnu/local.mk b/gnu/local.mk index 899dc06b8..b2a176d45 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -747,7 +747,6 @@ dist_patch_DATA = \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ - %D%/packages/patches/matplotlib-setupext-tk.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/mcron-install.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ diff --git a/gnu/packages/patches/matplotlib-setupext-tk.patch b/gnu/packages/patches/matplotlib-setupext-tk.patch deleted file mode 100644 index 37c3d686e..000000000 --- a/gnu/packages/patches/matplotlib-setupext-tk.patch +++ /dev/null @@ -1,34 +0,0 @@ -Use 'pkg-config' instead of heuristics to find 'tk' flags. - ---- matplotlib-1.4.3/setupext.py.orig 2015-12-01 14:21:19.554417453 +0100 -+++ matplotlib-1.4.3/setupext.py 2015-12-02 10:39:47.282363530 +0100 -@@ -1457,7 +1457,7 @@ - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, -- executable="/bin/sh", -+ executable="sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') -@@ -1601,8 +1601,19 @@ - # of distros. - - # Query Tcl/Tk system for library paths and version string -+ def getoutput(s): -+ ret = os.popen(s).read().strip() -+ return ret - try: -- tcl_lib_dir, tk_lib_dir, tk_ver = self.query_tcltk() -+ pkg_config_libs = getoutput('pkg-config --libs-only-L tk').split() -+ # drop '-L' part of strings -+ pkg_config_libs = [s[2:] for s in pkg_config_libs] -+ pkg_config_ver = getoutput('pkg-config --modversion tk') -+ tk_ver = re.match(r"(\d+.\d+)[\d.]*", pkg_config_ver).group(1) -+ tcl_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tcl-.*", s)) + '/tcl' + tk_ver -+ tk_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tk-.*", s)) + '/tk' + tk_ver - except: - tk_ver = '' - result = self.hardcoded_tcl_config() diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4f1359324..78a7cf1f0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -89,6 +89,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) + #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) #:use-module (gnu packages shells) @@ -3807,21 +3808,20 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") (define-public python-matplotlib (package (name "python-matplotlib") - (version "1.4.3") + (version "2.0.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/matplotlib/matplotlib" - "/matplotlib-" version - "/matplotlib-" version ".tar.gz")) + (uri (string-append + "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av")) - (patches (search-patches "matplotlib-setupext-tk.patch")))) + "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln")))) (build-system python-build-system) - (outputs '("out" "doc")) (propagated-inputs ; the following packages are all needed at run time - `(("python-pyparsing" ,python-pyparsing) + `(("python-cycler" ,python-cycler) + ("python-pyparsing" ,python-pyparsing) ("python-pygobject" ,python-pygobject) ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") @@ -3853,17 +3853,13 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("glib" ,glib) ;; FIXME: Add backends when available. ;("python-wxpython" ,python-wxpython) - ;("python-pyqt" ,python-pyqt) + ("python-pyqt" ,python-pyqt) ("tcl" ,tcl) ("tk" ,tk))) (native-inputs `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx-1.2.3) - ("python-numpydoc" ,python-numpydoc) ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("texlive" ,texlive) - ("texinfo" ,texinfo))) + ("python-mock" ,python-mock))) (arguments `(#:phases (modify-phases %standard-phases @@ -3882,26 +3878,66 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") basedirlist = ~a,~a~% [rc_options]~% backend = TkAgg~%" - (assoc-ref inputs "tcl") - (assoc-ref inputs "tk")))) - #t))) - (add-after 'install 'install-doc + (assoc-ref inputs "tcl") + (assoc-ref inputs "tk"))))) + #t))))) + (home-page "http://matplotlib.org") + (synopsis "2D plotting library for Python") + (description + "Matplotlib is a Python 2D plotting library which produces publication +quality figures in a variety of hardcopy formats and interactive environments +across platforms. Matplotlib can be used in Python scripts, the python and +ipython shell, web application servers, and six graphical user interface +toolkits.") + (license license:psfl) + (properties `((python2-variant . ,(delay python2-matplotlib)))))) + +(define-public python2-matplotlib + (let ((matplotlib (package-with-python2 + (strip-python2-variant python-matplotlib)))) + (package (inherit matplotlib) + ;; Make sure to use special packages for Python 2 instead + ;; of those automatically rewritten by package-with-python2. + (propagated-inputs + `(("python2-pycairo" ,python2-pycairo) + ("python2-pygobject-2" ,python2-pygobject-2) + ("python2-tkinter" ,python-2 "tk") + ,@(fold alist-delete (package-propagated-inputs matplotlib) + '("python-pycairo" "python-pygobject" "python-tkinter"))))))) + +(define-public python-matplotlib-documentation + (package + (name "python-matplotlib-documentation") + (version (package-version python-matplotlib)) + (source (package-source python-matplotlib)) + (build-system python-build-system) + (native-inputs + `(("python-matplotlib" ,python-matplotlib) + ("python-colorspacious" ,python-colorspacious) + ("python-sphinx" ,python-sphinx) + ("python-numpydoc" ,python-numpydoc) + ("python-ipython" ,python-ipython) + ("texlive" ,texlive) + ("texinfo" ,texinfo) + ,@(package-native-inputs python-matplotlib))) + (arguments + `(#:tests? #f ; we're only generating documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) (doc (string-append data "/doc/" ,name "-" ,version)) (info (string-append data "/info")) (html (string-append doc "/html"))) ;; Make installed package available for building the ;; documentation - (add-installed-pythonpath inputs outputs) (with-directory-excursion "doc" ;; Produce pdf in 'A4' format. (substitute* (find-files "." "conf\\.py") (("latex_paper_size = 'letter'") "latex_paper_size = 'a4'")) - (substitute* "users/intro.rst" - ;; Fix reST markup error (see <https://github.com/sphinx-doc/sphinx/issues/3044>) - (("[[][*][]]") "[#]")) (mkdir-p html) (mkdir-p info) ;; The doc recommends to run the 'html' target twice. @@ -3923,35 +3959,15 @@ backend = TkAgg~%" (copy-file "build/texinfo/matplotlib.info" (string-append info "/matplotlib.info")) (copy-file "build/latex/Matplotlib.pdf" - (string-append doc "/Matplotlib.pdf"))) - #t)))))) - (home-page "http://matplotlib.org") - (synopsis "2D plotting library for Python") - (description - "Matplotlib is a Python 2D plotting library which produces publication -quality figures in a variety of hardcopy formats and interactive environments -across platforms. Matplotlib can be used in Python scripts, the python and -ipython shell, web application servers, and six graphical user interface -toolkits.") - (license license:psfl) - (properties `((python2-variant . ,(delay python2-matplotlib)))))) + (string-append doc "/Matplotlib.pdf")))) + #t))))) + (home-page (package-home-page python-matplotlib)) + (synopsis "Documentation for the python-matplotlib package") + (description (package-description python-matplotlib)) + (license (package-license python-matplotlib)))) -(define-public python2-matplotlib - (let ((matplotlib (package-with-python2 - (strip-python2-variant python-matplotlib)))) - (package (inherit matplotlib) - ;; Make sure to use special packages for Python 2 instead - ;; of those automatically rewritten by package-with-python2. - (native-inputs - `(("python2-sphinx" ,python2-sphinx-1.2.3) - ,@(fold alist-delete (package-native-inputs matplotlib) - '("python-sphinx")))) - (propagated-inputs - `(("python2-pycairo" ,python2-pycairo) - ("python2-pygobject-2" ,python2-pygobject-2) - ("python2-tkinter" ,python-2 "tk") - ,@(fold alist-delete (package-propagated-inputs matplotlib) - '("python-pycairo" "python-pygobject" "python-tkinter"))))))) +(define-public python2-matplotlib-documentation + (package-with-python2 python-matplotlib-documentation)) (define-public python2-pysnptools (package -- 2.11.1 From dca7c6aab5a15eb2064287c2c355ed4fc19fde39 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Fri, 24 Feb 2017 17:07:27 +0100 Subject: [PATCH 6/9] gnu: python-testpath: Fix library location for python2 version. * gnu/packages/python.scm (python-testpath)[arguments]: Install module in the proper "lib/pythonx.y" location for all Python versions. --- gnu/packages/python.scm | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 78a7cf1f0..d8948d1c5 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5153,20 +5153,26 @@ installing @code{kernelspec}s for use with Jupyter frontends.") (build-system python-build-system) (arguments `(#:tests? #f ; this package does not even have a setup.py + #:modules ((guix build python-build-system) + (guix build utils) + (srfi srfi-1)) + #:imported-modules (,@%python-build-system-modules + (srfi srfi-1)) #:phases (modify-phases %standard-phases (delete 'install) (replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((dir (string-append - (assoc-ref outputs "out") - "/lib/python" - (string-take (string-take-right - (assoc-ref inputs "python") 5) 3) - "/site-packages/testpath"))) - (mkdir-p dir) - (copy-recursively "testpath" dir)) - #t))))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((version (last + (string-split (assoc-ref inputs "python") #\-))) + (x.y (string-join (take (string-split version #\.) 2) + ".")) + (dir (string-append + (assoc-ref outputs "out") + "/lib/python" x.y "/site-packages/testpath"))) + (mkdir-p dir) + (copy-recursively "testpath" dir)) + #t))))) (home-page "https://github.com/takluyver/testpath") (synopsis "Test utilities for code working with files and commands") (description -- 2.11.1 From 0dde6387dfb61f111e86331064fb30340ed3d972 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 12:41:09 +0100 Subject: [PATCH 7/9] gnu: python-ipython: Update to 5.2.2. * gnu/packages/python.scm (python-ipython): Update to 5.2.2. [propagated-inputs]: Add pyhon-prompt-toolkit and python-nbformat. (python2-ipython) [arguments]: Enable tests. [propagated-inputs]: Add python2-backports-shutil-get-terminal-size. --- gnu/packages/python.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d8948d1c5..691e11757 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5187,17 +5187,18 @@ tools for mocking system commands and recording calls to those.") (define-public python-ipython (package (name "python-ipython") - (version "4.0.3") + (version "5.2.2") (source (origin (method url-fetch) (uri (pypi-uri "ipython" version ".tar.gz")) (sha256 - (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is")))) + (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf")))) (build-system python-build-system) (outputs '("out" "doc")) (propagated-inputs `(("python-pyzmq" ,python-pyzmq) + ("python-prompt-toolkit" ,python-prompt-toolkit) ("python-terminado" ,python-terminado) ("python-matplotlib" ,python-matplotlib) ("python-numpy" ,python-numpy) @@ -5210,6 +5211,7 @@ tools for mocking system commands and recording calls to those.") ("python-jsonschema" ,python-jsonschema) ("python-traitlets" ,python-traitlets) ("python-ipykernel" ,python-ipykernel) + ("python-nbformat" ,python-nbformat) ("python-pygments" ,python-pygments))) (inputs `(("readline" ,readline) @@ -5220,6 +5222,7 @@ tools for mocking system commands and recording calls to those.") ("python-testpath" ,python-testpath) ("python-nose" ,python-nose) ("python-sphinx" ,python-sphinx) + ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme) ("texlive" ,texlive) ("texinfo" ,texinfo))) (arguments @@ -5233,15 +5236,16 @@ tools for mocking system commands and recording calls to those.") (html (string-append doc "/html")) (man1 (string-append data "/man/man1")) (info (string-append data "/info")) - (examples (string-append doc "/examples"))) + (examples (string-append doc "/examples")) + (python-arg (string-append "PYTHON=" (which "python")))) (setenv "LANG" "en_US.utf8") ;; Make installed package available for running the tests (add-installed-pythonpath inputs outputs) (with-directory-excursion "docs" ;; FIXME: pdf fails to build ;;(system* "make" "pdf" "PAPER=a4") - (system* "make" "html") - (system* "make" "info")) + (system* "make" python-arg "html") + (system* "make" python-arg "info")) (copy-recursively "docs/man" man1) (copy-recursively "examples" examples) (copy-recursively "docs/build/html" html) @@ -5291,10 +5295,12 @@ computing.") (let ((ipython (package-with-python2 (strip-python2-variant python-ipython)))) (package (inherit ipython) - ;; FIXME: some tests are failing - (arguments - `(#:tests? #f ,@(package-arguments ipython))) ;; FIXME: add pyreadline once available. + (propagated-inputs + `(("python2-backports-shutil-get-terminal-size" + ,python2-backports-shutil-get-terminal-size) + ("python2-pathlib2" ,python2-pathlib2) + ,@(package-propagated-inputs ipython))) (native-inputs `(("python2-mock" ,python2-mock) ,@(package-native-inputs ipython)))))) -- 2.11.1 From 1a4c6d3f1f18c696809b2987abac428c429beb5f Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 11:45:06 +0100 Subject: [PATCH 8/9] gnu: python-scipy: Update to 0.18.1. * gnu/packages/python.scm (python-scipy): Update to 0.18.1. [source]: Use github instead of sourceforge. [native-inputs]: Add python-cython. --- gnu/packages/python.scm | 104 ++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 56 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 691e11757..f164fff13 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4049,16 +4049,16 @@ functions.") (define-public python-scipy (package (name "python-scipy") - (version "0.16.0") + (version "0.18.1") (source (origin (method url-fetch) -; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz - (uri (string-append "mirror://sourceforge/scipy/scipy/" version - "/scipy-" version ".tar.xz")) + (uri (string-append "https://github.com/scipy/scipy/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2")))) + "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn")))) (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy) @@ -4068,21 +4068,16 @@ functions.") `(("lapack" ,lapack) ("openblas" ,openblas))) (native-inputs - `(("python-nose" ,python-nose) - ("python-sphinx" ,python-sphinx-1.2.3) + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) + ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("gfortran" ,gfortran) - ("texlive" ,texlive) ("perl" ,perl))) (outputs '("out" "doc")) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "scipy/integrate/tests/test_quadpack.py" - (("libm.so") "libm.so.6")) - #t)) (add-before 'build 'configure-openblas (lambda* (#:key inputs #:allow-other-keys) (call-with-output-file "site.cfg" @@ -4102,40 +4097,44 @@ atlas_libs = openblas (assoc-ref inputs "openblas") (assoc-ref inputs "openblas")))) #t)) - (delete 'check) - (add-after 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (html (string-append doc "/html")) - (pyver ,(string-append "PYVER="))) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "doc" - ;; Fix generation of images for mathematical expressions. - (substitute* (find-files "source" "conf\\.py") - (("pngmath_use_preview = True") - "pngmath_use_preview = False")) - (mkdir-p html) - (system* "make" "html" pyver) - (system* "make" "latex" "PAPER=a4" pyver) - (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver) - (copy-file "build/latex/scipy-ref.pdf" - (string-append doc "/scipy-ref.pdf")) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (install-file file html))) - (find-files "." ".*")))) - #t))) - (add-after 'install-doc 'check - (lambda _ - ;; Tests can only be run after the library has been installed and not - ;; within the source directory. - (with-directory-excursion "/tmp" - (zero? (system* "python" "-c" "import scipy; scipy.test()")))))))) + (add-after 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (doc (string-append data "/doc/" ,name "-" ,version)) + (html (string-append doc "/html")) + (pyver ,(string-append "PYVER="))) + ;; Make installed package available for building the + ;; documentation + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "doc" + ;; Fix generation of images for mathematical expressions. + (substitute* (find-files "source" "conf\\.py") + (("pngmath_use_preview = True") + "pngmath_use_preview = False")) + (mkdir-p html) + (system* "make" "html" pyver) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (install-file file html))) + (find-files "." ".*"))))) + #t)) + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "scipy/integrate/tests/test_quadpack.py" + (("libm.so") "libm.so.6")) + #t)) + ;; Tests can only be run after the library has been installed and not + ;; within the source directory. + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "/tmp" + (zero? (system* "python" "-c" + "import scipy; scipy.test('full')"))) + #t))))) (home-page "http://www.scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up @@ -4145,15 +4144,8 @@ routines such as routines for numerical integration and optimization.") (license license:bsd-3))) (define-public python2-scipy - (let ((scipy (package-with-python2 - (strip-python2-variant python-scipy)))) - (package (inherit scipy) - ;; Make sure to use special packages for Python 2 instead - ;; of those automatically rewritten by package-with-python2. - (native-inputs - `(("python2-sphinx" ,python2-sphinx-1.2.3) - ,@(fold alist-delete (package-native-inputs scipy) - '("python-sphinx"))))))) + (package-with-python2 + (strip-python2-variant python-scipy))) (define-public python-socksipy-branch (package -- 2.11.1 From f48c4ae867e21f0843bd1487a9c1cc54bd2d78d6 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <thomas.danckaert <at> gmail.com> Date: Sat, 25 Feb 2017 23:35:22 +0100 Subject: [PATCH 9/9] gnu: Remove python-sphinx-1.2.3. * gnu/packages/python.scm (python-sphinx-1.2.3, python2-sphinx-1.2.3): Remove variables. --- gnu/packages/python.scm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f164fff13..22c4d7aae 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3029,24 +3029,6 @@ sources.") (propagated-inputs `(("python2-pytz" ,python2-pytz) ,@(package-propagated-inputs base)))))) -;; This is needed for python-matplotlib <at> 1.4 and python-scipy <at> 0.16, at least. -;; Try removing this when they are updated. -(define-public python-sphinx-1.2.3 - (package (inherit python-sphinx) - (version "1.2.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "Sphinx" version)) - (sha256 - (base32 - "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl")))) - ;; XXX: "'NoneType' object has no attribute 'split'". - (arguments '(#:tests? #f)))) - -(define-public python2-sphinx-1.2.3 - (package (inherit (package-with-python2 - (strip-python2-variant python-sphinx-1.2.3))))) - (define-public python-sphinx-rtd-theme (package (name "python-sphinx-rtd-theme") -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 27 Feb 2017 10:34:01 GMT) Full text and rfc822 format available.Message #53 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Ben Woodcroft <b.woodcroft <at> uq.edu.au> To: Thomas Danckaert <post <at> thomasdanckaert.be>, mbakke <at> fastmail.com, 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 27 Feb 2017 20:33:07 +1000
Hi Thomas. On 27/02/17 19:54, Thomas Danckaert wrote: [..] >>> + (source >>> + (origin >>> + (method url-fetch) >>> + (uri (string-append >>> + "https://pypi.python.org/packages/ec/9c/" >>> + "368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/" >>> + "backports.shutil_get_terminal_size-" version >>> ".tar.gz")) >> >> Is it possible to use 'pypi-uri' here? > > I couldn't find a working pypi-uri, having tried all sorts of > combinations of “backports.shutil-get-terminal-size” or > “backports-shutil-get-terminal-size” (is there some sort of trick to > find these? These simple urls are never listed on pypi, is my > impression.). I managed to get it downloading something with (uri (pypi-uri "backports.shutil_get_terminal_size" version)) which I ascertained by looking at the "name" in setup.py at https://github.com/chrippa/backports.shutil_get_terminal_size/blob/master/setup.py ben
Thomas Danckaert <post <at> thomasdanckaert.be>
to control <at> debbugs.gnu.org
.
(Mon, 27 Feb 2017 11:25:03 GMT) Full text and rfc822 format available.guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Thu, 02 Mar 2017 14:15:02 GMT) Full text and rfc822 format available.Message #58 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: b.woodcroft <at> uq.edu.au Cc: mbakke <at> fastmail.com, 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Thu, 02 Mar 2017 15:13:43 +0100 (CET)
[Message part 1 (text/plain, inline)]
From: Ben Woodcroft <b.woodcroft <at> uq.edu.au> Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 27 Feb 2017 20:33:07 +1000 > I managed to get it downloading something with > > (uri (pypi-uri "backports.shutil_get_terminal_size" version)) > > which I ascertained by looking at the "name" in setup.py at > https://github.com/chrippa/backports.shutil_get_terminal_size/blob/master/setup.py Thanks (again), Ben. I've attached an updated patch series (rebased on current python-tests branch). Thomas
[numpy-updates.patch (text/x-patch, inline)]
From b1da3400ddea2f6921e65953102bde5c4541287e Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 13:33:20 +0100 Subject: [PATCH 1/8] gnu: Add python2-backports-shutil-get-terminal-size. * gnu/packages/python.scm (python2-backports-shutil-get-terminal-size): New variable. --- gnu/packages/python.scm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a8ba1b8c7..03a9de576 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -33,7 +33,7 @@ ;;; Copyright © 2016 Arun Isaac <arunisaac <at> systemreboot.net> ;;; Copyright © 2016, 2017 Julien Lepiller <julien <at> lepiller.eu> ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me <at> tobias.gr> -;;; Copyright © 2016 Thomas Danckaert <post <at> thomasdanckaert.be> +;;; Copyright © 2016, 2017 Thomas Danckaert <post <at> thomasdanckaert.be> ;;; Copyright © 2017 Carlo Zancanaro <carlo <at> zancanaro.id.au> ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis <at> gmail.com> ;;; @@ -6024,6 +6024,30 @@ connection to each user.") (define-public python2-backports-abc (package-with-python2 python-backports-abc)) +(define-public python2-backports-shutil-get-terminal-size + (package + (name "python2-backports-shutil-get-terminal-size") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "backports.shutil_get_terminal_size" version)) + (sha256 + (base32 + "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2)) + (home-page + "https://github.com/chrippa/backports.shutil_get_terminal_size") + (synopsis + "Backport of Python 3.3's shutil.get_terminal_size") + (description + "A backport of the @code{get_terminal_size function} from Python 3.3's @code{shutil}. +Unlike the original version it is written in pure Python rather than C, so it +might be a tiny bit slower.") + (license license:expat))) + (define-public python-waf (package (name "python-waf") -- 2.11.1 From 5de56bad756d816e286797b399f3442b9eb68f21 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 21:33:02 +0100 Subject: [PATCH 2/8] gnu: Add python-colorspacious. * gnu/packages/python.scm (python-colorspacious, python2-colorspacious): New variables. --- gnu/packages/python.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 03a9de576..c449ccb6e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3763,6 +3763,31 @@ To address this and enable easy cycling over arbitrary @code{kwargs}, the (define-public python2-cycler (package-with-python2 python-cycler)) +(define-public python-colorspacious + (package + (name "python-colorspacious") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/njsmith/colorspacious/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version)) + (sha256 + (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k")))) + (build-system python-build-system) + (propagated-inputs + `(("python-numpy" ,python-numpy))) + (home-page "https://github.com/njsmith/colorspacious") + (synopsis "Python library for colorspace conversions") + (description "Colorspacious is a Python library that lets you easily convert +between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") + (license license:expat))) + +(define-public python2-colorspacious + (package-with-python2 python-colorspacious)) + (define-public python-matplotlib (package (name "python-matplotlib") -- 2.11.1 From b73e26ce12dc2fd0b38937bc615f5071556dfd5a Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 20:28:27 +0100 Subject: [PATCH 3/8] gnu: python-numpy: Update to 1.12.0. * gnu/packages/python.scm (python-numpy): Update to 1.12.0. [source]: Use github instead of sourceforge. [native-inputs]: Add python-cython. To simplify the handling of dependency cycles (numpy documentation depends on matplotlib, which depends on numpy), we split out the documentation into a separate package: (python-numpy-bootstrap, python2-numpy-bootstrap): Remove variables. (python-numpy-documentation, python2-numpy-documentation): New variables. --- gnu/packages/python.scm | 148 +++++++++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 66 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c449ccb6e..d296ee1d9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3402,24 +3402,26 @@ between language specification and implementation aspects.") ;; This version of numpy is missing the documentation and is only used to ;; build matplotlib which is required to build numpy's documentation. -(define python-numpy-bootstrap +(define-public python-numpy (package - (name "python-numpy-bootstrap") - (version "1.10.4") + (name "python-numpy") + (version "1.12.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/numpy/NumPy/" version - "/numpy-" version ".tar.gz")) + (uri (string-append + "https://github.com/numpy/numpy/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp")))) + "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d")))) (build-system python-build-system) (inputs `(("openblas" ,openblas) ("lapack" ,lapack))) (native-inputs - `(("python-nose" ,python-nose) + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) ("gfortran" ,gfortran))) (arguments `(#:phases @@ -3468,8 +3470,8 @@ and Fortran code, useful linear algebra, Fourier transform, and random number capabilities.") (license license:bsd-3))) -(define python2-numpy-bootstrap - (package-with-python2 python-numpy-bootstrap)) +(define-public python2-numpy + (package-with-python2 python-numpy)) (define-public python-munch (package @@ -3526,69 +3528,83 @@ Models, is a program for performing both single-SNP and SNP-set genome-wide association studies (GWAS) on extremely large data sets.") (license license:asl2.0))) -(define-public python-numpy - (package (inherit python-numpy-bootstrap) - (name "python-numpy") - (outputs '("out" "doc")) - (inputs - `(("which" ,which) - ,@(package-inputs python-numpy-bootstrap))) - (propagated-inputs - `(("python-matplotlib" ,python-matplotlib) - ("python-pyparsing" ,python-pyparsing) - ,@(package-propagated-inputs python-numpy-bootstrap))) +(define-public python-numpy-documentation + (package + (name "python-numpy-documentation") + (version (package-version python-numpy)) + (source (package-source python-numpy)) + (build-system python-build-system) (native-inputs - `(("pkg-config" ,pkg-config) + `(("python-matplotlib" ,python-matplotlib) + ("python-numpy" ,python-numpy) + ("pkg-config" ,pkg-config) ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("texlive" ,texlive) ("texinfo" ,texinfo) ("perl" ,perl) - ,@(package-native-inputs python-numpy-bootstrap))) - (arguments - `(,@(substitute-keyword-arguments - (package-arguments python-numpy-bootstrap) - ((#:phases phases) - `(alist-cons-after - 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append - data "/doc/" ,name "-" - ,(package-version python-numpy-bootstrap))) - (info (string-append data "/info")) - (html (string-append doc "/html")) - (pyver ,(string-append "PYVER="))) - (with-directory-excursion "doc" - (mkdir-p html) - (system* "make" "html" pyver) - (system* "make" "latex" "PAPER=a4" pyver) - (system* "make" "-C" "build/latex" - "all-pdf" "PAPER=a4" pyver) - ;; FIXME: Generation of the info file fails. - ;; (system* "make" "info" pyver) - ;; (mkdir-p info) - ;; (copy-file "build/texinfo/numpy.info" - ;; (string-append info "/numpy.info")) - (for-each (lambda (file) - (copy-file (string-append "build/latex" file) - (string-append doc file))) - '("/numpy-ref.pdf" "/numpy-user.pdf")) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (unless (equal? "." dir) - (mkdir-p tgt-dir)) - (install-file file html))) - (find-files "." ".*")))))) - ,phases))))))) + ("scipy-sphinx-theme" + ,(origin ; The build script expects scipy-sphinx-theme as a git submodule + (method git-fetch) + (uri (git-reference + (url "https://github.com/scipy/scipy-sphinx-theme.git") + (commit "c466764e22"))) + (sha256 + (base32 + "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) + ,@(package-native-inputs python-numpy))) + (arguments + `(#:tests? #f ; we're only generating the documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append + data "/doc/" ,name "-" + ,(package-version python-numpy))) + (info-reader (string-append data "/info")) + (html (string-append doc "/html")) + (scipy-sphinx-theme "scipy-sphinx-theme") + (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) + (pyver ,(string-append "PYVER="))) + (with-directory-excursion "doc" + (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) + (mkdir-p html) + (system* "make" "html" pyver) + (system* "make" "latex" "PAPER=a4" pyver) + (system* "make" "-C" "build/latex" + "all-pdf" "PAPER=a4" pyver) + ;; FIXME: Generation of the info file fails. + ;; (system* "make" "info" pyver) + ;; (mkdir-p info) + ;; (copy-file "build/texinfo/numpy.info" + ;; (string-append info "/numpy.info")) + (for-each (lambda (file) + (copy-file (string-append "build/latex" file) + (string-append doc file))) + '("/numpy-ref.pdf" "/numpy-user.pdf")) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (unless (equal? "." dir) + (mkdir-p tgt-dir)) + (install-file file html))) + (find-files "." ".*"))))) + #t))))) + (home-page (package-home-page python-numpy)) + (synopsis "Documentation for the python-numpy package") + (description (package-description python-numpy)) + (license (package-license python-numpy)))) -(define-public python2-numpy - (package-with-python2 python-numpy)) +(define-public python2-numpy-documentation + (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) + (package + (inherit numpy-documentation) + (native-inputs `(("python2-functools32" ,python2-functools32) + ,@(package-native-inputs numpy-documentation)))))) (define-public python-pygit2 (package @@ -3810,7 +3826,7 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") ("python-dateutil" ,python-dateutil) - ("python-numpy" ,python-numpy-bootstrap) + ("python-numpy" ,python-numpy) ("python-pillow" ,python-pillow) ("python-pytz" ,python-pytz) ("python-six" ,python-six) -- 2.11.1 From 99bd1a9ae4c7fd4ad52437c25ae40726235eb6b0 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 22:18:45 +0100 Subject: [PATCH 4/8] gnu: python-matplotlib: Update to 2.0.0. * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. [source]: Remove Tk backend patch, use Github instead of Sourceforge. [outputs]: Remove "doc" output. [inputs]: Add python-pyqt. [propagated-inputs]: Add python-cycler. [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. (python-matplotlib-documentation, python2-matplotlib-documentation): New variables. * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/patches/matplotlib-setupext-tk.patch | 34 ------- gnu/packages/python.scm | 118 ++++++++++++---------- 3 files changed, 67 insertions(+), 86 deletions(-) delete mode 100644 gnu/packages/patches/matplotlib-setupext-tk.patch diff --git a/gnu/local.mk b/gnu/local.mk index 9d2cd0ad2..29b980829 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -746,7 +746,6 @@ dist_patch_DATA = \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ - %D%/packages/patches/matplotlib-setupext-tk.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/mcron-install.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ diff --git a/gnu/packages/patches/matplotlib-setupext-tk.patch b/gnu/packages/patches/matplotlib-setupext-tk.patch deleted file mode 100644 index 37c3d686e..000000000 --- a/gnu/packages/patches/matplotlib-setupext-tk.patch +++ /dev/null @@ -1,34 +0,0 @@ -Use 'pkg-config' instead of heuristics to find 'tk' flags. - ---- matplotlib-1.4.3/setupext.py.orig 2015-12-01 14:21:19.554417453 +0100 -+++ matplotlib-1.4.3/setupext.py 2015-12-02 10:39:47.282363530 +0100 -@@ -1457,7 +1457,7 @@ - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, -- executable="/bin/sh", -+ executable="sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') -@@ -1601,8 +1601,19 @@ - # of distros. - - # Query Tcl/Tk system for library paths and version string -+ def getoutput(s): -+ ret = os.popen(s).read().strip() -+ return ret - try: -- tcl_lib_dir, tk_lib_dir, tk_ver = self.query_tcltk() -+ pkg_config_libs = getoutput('pkg-config --libs-only-L tk').split() -+ # drop '-L' part of strings -+ pkg_config_libs = [s[2:] for s in pkg_config_libs] -+ pkg_config_ver = getoutput('pkg-config --modversion tk') -+ tk_ver = re.match(r"(\d+.\d+)[\d.]*", pkg_config_ver).group(1) -+ tcl_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tcl-.*", s)) + '/tcl' + tk_ver -+ tk_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tk-.*", s)) + '/tk' + tk_ver - except: - tk_ver = '' - result = self.hardcoded_tcl_config() diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d296ee1d9..0b223f1fc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -89,6 +89,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) + #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) #:use-module (gnu packages shells) @@ -3807,21 +3808,20 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") (define-public python-matplotlib (package (name "python-matplotlib") - (version "1.4.3") + (version "2.0.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/matplotlib/matplotlib" - "/matplotlib-" version - "/matplotlib-" version ".tar.gz")) + (uri (string-append + "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av")) - (patches (search-patches "matplotlib-setupext-tk.patch")))) + "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln")))) (build-system python-build-system) - (outputs '("out" "doc")) (propagated-inputs ; the following packages are all needed at run time - `(("python-pyparsing" ,python-pyparsing) + `(("python-cycler" ,python-cycler) + ("python-pyparsing" ,python-pyparsing) ("python-pygobject" ,python-pygobject) ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") @@ -3853,17 +3853,13 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") ("glib" ,glib) ;; FIXME: Add backends when available. ;("python-wxpython" ,python-wxpython) - ;("python-pyqt" ,python-pyqt) + ("python-pyqt" ,python-pyqt) ("tcl" ,tcl) ("tk" ,tk))) (native-inputs `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx-1.2.3) - ("python-numpydoc" ,python-numpydoc) ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("texlive" ,texlive) - ("texinfo" ,texinfo))) + ("python-mock" ,python-mock))) (arguments `(#:phases (modify-phases %standard-phases @@ -3882,26 +3878,66 @@ between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.") basedirlist = ~a,~a~% [rc_options]~% backend = TkAgg~%" - (assoc-ref inputs "tcl") - (assoc-ref inputs "tk")))) - #t))) - (add-after 'install 'install-doc + (assoc-ref inputs "tcl") + (assoc-ref inputs "tk"))))) + #t))))) + (home-page "http://matplotlib.org") + (synopsis "2D plotting library for Python") + (description + "Matplotlib is a Python 2D plotting library which produces publication +quality figures in a variety of hardcopy formats and interactive environments +across platforms. Matplotlib can be used in Python scripts, the python and +ipython shell, web application servers, and six graphical user interface +toolkits.") + (license license:psfl) + (properties `((python2-variant . ,(delay python2-matplotlib)))))) + +(define-public python2-matplotlib + (let ((matplotlib (package-with-python2 + (strip-python2-variant python-matplotlib)))) + (package (inherit matplotlib) + ;; Make sure to use special packages for Python 2 instead + ;; of those automatically rewritten by package-with-python2. + (propagated-inputs + `(("python2-pycairo" ,python2-pycairo) + ("python2-pygobject-2" ,python2-pygobject-2) + ("python2-tkinter" ,python-2 "tk") + ,@(fold alist-delete (package-propagated-inputs matplotlib) + '("python-pycairo" "python-pygobject" "python-tkinter"))))))) + +(define-public python-matplotlib-documentation + (package + (name "python-matplotlib-documentation") + (version (package-version python-matplotlib)) + (source (package-source python-matplotlib)) + (build-system python-build-system) + (native-inputs + `(("python-matplotlib" ,python-matplotlib) + ("python-colorspacious" ,python-colorspacious) + ("python-sphinx" ,python-sphinx) + ("python-numpydoc" ,python-numpydoc) + ("python-ipython" ,python-ipython) + ("texlive" ,texlive) + ("texinfo" ,texinfo) + ,@(package-native-inputs python-matplotlib))) + (arguments + `(#:tests? #f ; we're only generating documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) (doc (string-append data "/doc/" ,name "-" ,version)) (info (string-append data "/info")) (html (string-append doc "/html"))) ;; Make installed package available for building the ;; documentation - (add-installed-pythonpath inputs outputs) (with-directory-excursion "doc" ;; Produce pdf in 'A4' format. (substitute* (find-files "." "conf\\.py") (("latex_paper_size = 'letter'") "latex_paper_size = 'a4'")) - (substitute* "users/intro.rst" - ;; Fix reST markup error (see <https://github.com/sphinx-doc/sphinx/issues/3044>) - (("[[][*][]]") "[#]")) (mkdir-p html) (mkdir-p info) ;; The doc recommends to run the 'html' target twice. @@ -3923,35 +3959,15 @@ backend = TkAgg~%" (copy-file "build/texinfo/matplotlib.info" (string-append info "/matplotlib.info")) (copy-file "build/latex/Matplotlib.pdf" - (string-append doc "/Matplotlib.pdf"))) - #t)))))) - (home-page "http://matplotlib.org") - (synopsis "2D plotting library for Python") - (description - "Matplotlib is a Python 2D plotting library which produces publication -quality figures in a variety of hardcopy formats and interactive environments -across platforms. Matplotlib can be used in Python scripts, the python and -ipython shell, web application servers, and six graphical user interface -toolkits.") - (license license:psfl) - (properties `((python2-variant . ,(delay python2-matplotlib)))))) + (string-append doc "/Matplotlib.pdf")))) + #t))))) + (home-page (package-home-page python-matplotlib)) + (synopsis "Documentation for the python-matplotlib package") + (description (package-description python-matplotlib)) + (license (package-license python-matplotlib)))) -(define-public python2-matplotlib - (let ((matplotlib (package-with-python2 - (strip-python2-variant python-matplotlib)))) - (package (inherit matplotlib) - ;; Make sure to use special packages for Python 2 instead - ;; of those automatically rewritten by package-with-python2. - (native-inputs - `(("python2-sphinx" ,python2-sphinx-1.2.3) - ,@(fold alist-delete (package-native-inputs matplotlib) - '("python-sphinx")))) - (propagated-inputs - `(("python2-pycairo" ,python2-pycairo) - ("python2-pygobject-2" ,python2-pygobject-2) - ("python2-tkinter" ,python-2 "tk") - ,@(fold alist-delete (package-propagated-inputs matplotlib) - '("python-pycairo" "python-pygobject" "python-tkinter"))))))) +(define-public python2-matplotlib-documentation + (package-with-python2 python-matplotlib-documentation)) (define-public python2-pysnptools (package -- 2.11.1 From 66c61b4683f8bb2ef15f3b659af3ddd1ac8c7927 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Fri, 24 Feb 2017 17:07:27 +0100 Subject: [PATCH 5/8] gnu: python-testpath: Fix library location for python2 version. * gnu/packages/python.scm (python-testpath)[arguments]: Install module in the proper "lib/pythonx.y" location for all Python versions. --- gnu/packages/python.scm | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 0b223f1fc..daa001fe0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5153,20 +5153,26 @@ installing @code{kernelspec}s for use with Jupyter frontends.") (build-system python-build-system) (arguments `(#:tests? #f ; this package does not even have a setup.py + #:modules ((guix build python-build-system) + (guix build utils) + (srfi srfi-1)) + #:imported-modules (,@%python-build-system-modules + (srfi srfi-1)) #:phases (modify-phases %standard-phases (delete 'install) (replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((dir (string-append - (assoc-ref outputs "out") - "/lib/python" - (string-take (string-take-right - (assoc-ref inputs "python") 5) 3) - "/site-packages/testpath"))) - (mkdir-p dir) - (copy-recursively "testpath" dir)) - #t))))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((version (last + (string-split (assoc-ref inputs "python") #\-))) + (x.y (string-join (take (string-split version #\.) 2) + ".")) + (dir (string-append + (assoc-ref outputs "out") + "/lib/python" x.y "/site-packages/testpath"))) + (mkdir-p dir) + (copy-recursively "testpath" dir)) + #t))))) (home-page "https://github.com/takluyver/testpath") (synopsis "Test utilities for code working with files and commands") (description -- 2.11.1 From c7ff74dedc83b4614ab5aaeddc19e7acd6305693 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 12:41:09 +0100 Subject: [PATCH 6/8] gnu: python-ipython: Update to 5.2.2. * gnu/packages/python.scm (python-ipython): Update to 5.2.2. [propagated-inputs]: Add pyhon-prompt-toolkit and python-nbformat. (python2-ipython) [arguments]: Enable tests. [propagated-inputs]: Add python2-backports-shutil-get-terminal-size. --- gnu/packages/python.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index daa001fe0..583c53149 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5187,17 +5187,18 @@ tools for mocking system commands and recording calls to those.") (define-public python-ipython (package (name "python-ipython") - (version "4.0.3") + (version "5.2.2") (source (origin (method url-fetch) (uri (pypi-uri "ipython" version ".tar.gz")) (sha256 - (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is")))) + (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf")))) (build-system python-build-system) (outputs '("out" "doc")) (propagated-inputs `(("python-pyzmq" ,python-pyzmq) + ("python-prompt-toolkit" ,python-prompt-toolkit) ("python-terminado" ,python-terminado) ("python-matplotlib" ,python-matplotlib) ("python-numpy" ,python-numpy) @@ -5210,6 +5211,7 @@ tools for mocking system commands and recording calls to those.") ("python-jsonschema" ,python-jsonschema) ("python-traitlets" ,python-traitlets) ("python-ipykernel" ,python-ipykernel) + ("python-nbformat" ,python-nbformat) ("python-pygments" ,python-pygments))) (inputs `(("readline" ,readline) @@ -5220,6 +5222,7 @@ tools for mocking system commands and recording calls to those.") ("python-testpath" ,python-testpath) ("python-nose" ,python-nose) ("python-sphinx" ,python-sphinx) + ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme) ("texlive" ,texlive) ("texinfo" ,texinfo))) (arguments @@ -5233,15 +5236,16 @@ tools for mocking system commands and recording calls to those.") (html (string-append doc "/html")) (man1 (string-append data "/man/man1")) (info (string-append data "/info")) - (examples (string-append doc "/examples"))) + (examples (string-append doc "/examples")) + (python-arg (string-append "PYTHON=" (which "python")))) (setenv "LANG" "en_US.utf8") ;; Make installed package available for running the tests (add-installed-pythonpath inputs outputs) (with-directory-excursion "docs" ;; FIXME: pdf fails to build ;;(system* "make" "pdf" "PAPER=a4") - (system* "make" "html") - (system* "make" "info")) + (system* "make" python-arg "html") + (system* "make" python-arg "info")) (copy-recursively "docs/man" man1) (copy-recursively "examples" examples) (copy-recursively "docs/build/html" html) @@ -5291,10 +5295,12 @@ computing.") (let ((ipython (package-with-python2 (strip-python2-variant python-ipython)))) (package (inherit ipython) - ;; FIXME: some tests are failing - (arguments - `(#:tests? #f ,@(package-arguments ipython))) ;; FIXME: add pyreadline once available. + (propagated-inputs + `(("python2-backports-shutil-get-terminal-size" + ,python2-backports-shutil-get-terminal-size) + ("python2-pathlib2" ,python2-pathlib2) + ,@(package-propagated-inputs ipython))) (native-inputs `(("python2-mock" ,python2-mock) ,@(package-native-inputs ipython)))))) -- 2.11.1 From 2fbe5993e969566f07191be3578b351994839e93 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Tue, 21 Feb 2017 11:45:06 +0100 Subject: [PATCH 7/8] gnu: python-scipy: Update to 0.18.1. * gnu/packages/python.scm (python-scipy): Update to 0.18.1. [source]: Use github instead of sourceforge. [native-inputs]: Add python-cython. --- gnu/packages/python.scm | 104 ++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 56 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 583c53149..404ac38e3 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4049,16 +4049,16 @@ functions.") (define-public python-scipy (package (name "python-scipy") - (version "0.16.0") + (version "0.18.1") (source (origin (method url-fetch) -; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz - (uri (string-append "mirror://sourceforge/scipy/scipy/" version - "/scipy-" version ".tar.xz")) + (uri (string-append "https://github.com/scipy/scipy/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2")))) + "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn")))) (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy) @@ -4068,21 +4068,16 @@ functions.") `(("lapack" ,lapack) ("openblas" ,openblas))) (native-inputs - `(("python-nose" ,python-nose) - ("python-sphinx" ,python-sphinx-1.2.3) + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) + ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("gfortran" ,gfortran) - ("texlive" ,texlive) ("perl" ,perl))) (outputs '("out" "doc")) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "scipy/integrate/tests/test_quadpack.py" - (("libm.so") "libm.so.6")) - #t)) (add-before 'build 'configure-openblas (lambda* (#:key inputs #:allow-other-keys) (call-with-output-file "site.cfg" @@ -4102,40 +4097,44 @@ atlas_libs = openblas (assoc-ref inputs "openblas") (assoc-ref inputs "openblas")))) #t)) - (delete 'check) - (add-after 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (html (string-append doc "/html")) - (pyver ,(string-append "PYVER="))) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "doc" - ;; Fix generation of images for mathematical expressions. - (substitute* (find-files "source" "conf\\.py") - (("pngmath_use_preview = True") - "pngmath_use_preview = False")) - (mkdir-p html) - (system* "make" "html" pyver) - (system* "make" "latex" "PAPER=a4" pyver) - (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver) - (copy-file "build/latex/scipy-ref.pdf" - (string-append doc "/scipy-ref.pdf")) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (install-file file html))) - (find-files "." ".*")))) - #t))) - (add-after 'install-doc 'check - (lambda _ - ;; Tests can only be run after the library has been installed and not - ;; within the source directory. - (with-directory-excursion "/tmp" - (zero? (system* "python" "-c" "import scipy; scipy.test()")))))))) + (add-after 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (doc (string-append data "/doc/" ,name "-" ,version)) + (html (string-append doc "/html")) + (pyver ,(string-append "PYVER="))) + ;; Make installed package available for building the + ;; documentation + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "doc" + ;; Fix generation of images for mathematical expressions. + (substitute* (find-files "source" "conf\\.py") + (("pngmath_use_preview = True") + "pngmath_use_preview = False")) + (mkdir-p html) + (system* "make" "html" pyver) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (install-file file html))) + (find-files "." ".*"))))) + #t)) + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "scipy/integrate/tests/test_quadpack.py" + (("libm.so") "libm.so.6")) + #t)) + ;; Tests can only be run after the library has been installed and not + ;; within the source directory. + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "/tmp" + (zero? (system* "python" "-c" + "import scipy; scipy.test('full')"))) + #t))))) (home-page "http://www.scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up @@ -4145,15 +4144,8 @@ routines such as routines for numerical integration and optimization.") (license license:bsd-3))) (define-public python2-scipy - (let ((scipy (package-with-python2 - (strip-python2-variant python-scipy)))) - (package (inherit scipy) - ;; Make sure to use special packages for Python 2 instead - ;; of those automatically rewritten by package-with-python2. - (native-inputs - `(("python2-sphinx" ,python2-sphinx-1.2.3) - ,@(fold alist-delete (package-native-inputs scipy) - '("python-sphinx"))))))) + (package-with-python2 + (strip-python2-variant python-scipy))) (define-public python-socksipy-branch (package -- 2.11.1 From 49827031bbee8c06c89824ce5c6a72fab3635b31 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <thomas.danckaert <at> gmail.com> Date: Sat, 25 Feb 2017 23:35:22 +0100 Subject: [PATCH 8/8] gnu: Remove python-sphinx-1.2.3. * gnu/packages/python.scm (python-sphinx-1.2.3, python2-sphinx-1.2.3): Remove variables. --- gnu/packages/python.scm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 404ac38e3..e3fff483b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3029,24 +3029,6 @@ sources.") (propagated-inputs `(("python2-pytz" ,python2-pytz) ,@(package-propagated-inputs base)))))) -;; This is needed for python-matplotlib <at> 1.4 and python-scipy <at> 0.16, at least. -;; Try removing this when they are updated. -(define-public python-sphinx-1.2.3 - (package (inherit python-sphinx) - (version "1.2.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "Sphinx" version)) - (sha256 - (base32 - "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl")))) - ;; XXX: "'NoneType' object has no attribute 'split'". - (arguments '(#:tests? #f)))) - -(define-public python2-sphinx-1.2.3 - (package (inherit (package-with-python2 - (strip-python2-variant python-sphinx-1.2.3))))) - (define-public python-sphinx-rtd-theme (package (name "python-sphinx-rtd-theme") -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 09:02:02 GMT) Full text and rfc822 format available.Message #61 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Danny Milosavljevic <dannym <at> scratchpost.org> To: Thomas Danckaert <post <at> thomasdanckaert.be> Cc: 25834 <at> debbugs.gnu.org, b.woodcroft <at> uq.edu.au Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 6 Mar 2017 10:01:21 +0100
Pushed python-scipy as 350932536a2e04bf4644cdad7ce2b91d8b12cd10 to master. Pushed python-testpath as b320f7bf06213087886d4f7fb12baccbc399f3e3 to master. Pushed python-colorspacious as 2aa6d3aeeb49f116aab2757b217cd25fab71d7d6 to master. Pushed python-ipython as 6d320eb0e320d6c9bcbca5fa9b5ffa7d1250bb8b to master. I'm not sure about splitting the documentation into extra packages so I didn't push those. Was that already discussed?
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 09:34:02 GMT) Full text and rfc822 format available.Message #64 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: dannym <at> scratchpost.org Cc: 25834 <at> debbugs.gnu.org, b.woodcroft <at> uq.edu.au Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 06 Mar 2017 10:32:54 +0100 (CET)
From: Danny Milosavljevic <dannym <at> scratchpost.org> Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 6 Mar 2017 10:01:21 +0100 > Pushed python-scipy as 350932536a2e04bf4644cdad7ce2b91d8b12cd10 to > master. > Pushed python-testpath as b320f7bf06213087886d4f7fb12baccbc399f3e3 > to master. > Pushed python-colorspacious as > 2aa6d3aeeb49f116aab2757b217cd25fab71d7d6 to master. > Pushed python-ipython as 6d320eb0e320d6c9bcbca5fa9b5ffa7d1250bb8b > to master. Thanks! > I'm not sure about splitting the documentation into extra packages > so I didn't push those. Was that already discussed? Ricardo agreed that separate documentation packages are ok if we can avoid a large number of bootstrap packages: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25834#8 Thomas
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 13:26:02 GMT) Full text and rfc822 format available.Message #67 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Danny Milosavljevic <dannym <at> scratchpost.org>, Thomas Danckaert <post <at> thomasdanckaert.be> Cc: 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 06 Mar 2017 14:25:26 +0100
[Message part 1 (text/plain, inline)]
Danny Milosavljevic <dannym <at> scratchpost.org> writes: > Pushed python-scipy as 350932536a2e04bf4644cdad7ce2b91d8b12cd10 to master. > Pushed python-testpath as b320f7bf06213087886d4f7fb12baccbc399f3e3 to master. > Pushed python-colorspacious as 2aa6d3aeeb49f116aab2757b217cd25fab71d7d6 to master. > Pushed python-ipython as 6d320eb0e320d6c9bcbca5fa9b5ffa7d1250bb8b to master. Thanks for pushing these! Please pay attention during the 'check' phase of Python packages -- both colorspacious and the shutils backport prints 'Ran 0 tests in...'. Usually this is a sign that they require some other command than 'python setup.py test', which is the default of python-build-system. I pushed a fix for python2-backports-shutil-get-terminal-size that I had in my queue, but it would be nice to enable tests on colorspacious as well. Any takers? :) > I'm not sure about splitting the documentation into extra packages so > I didn't push those. Was that already discussed? This approach works around a bootstrapping issue, and also a circular dependency in later versions. I'm currently building these and will push them later today, unless there are problems (or someone beats me to it :))
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 14:41:01 GMT) Full text and rfc822 format available.Message #70 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Thomas Danckaert <post <at> thomasdanckaert.be> To: mbakke <at> fastmail.com Cc: dannym <at> scratchpost.org, 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 06 Mar 2017 15:39:39 +0100 (CET)
[Message part 1 (text/plain, inline)]
From: Marius Bakke <mbakke <at> fastmail.com> Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 06 Mar 2017 14:25:26 +0100 > Please pay attention during the 'check' phase of Python packages -- > both > colorspacious and the shutils backport prints 'Ran 0 tests in...'. > Usually this is a sign that they require some other command than > 'python > setup.py test', which is the default of python-build-system. > > I pushed a fix for python2-backports-shutil-get-terminal-size that > I had > in my queue, but it would be nice to enable tests on colorspacious > as > well. Any takers? :) I've attached an attempt (now runs 34 tests). Am I right that running “nosetests colorspacious/*.py” is the only way to make it run the tests in this case? cheers, Thomas
[0001-gnu-python-colorspacious-Run-tests.patch (text/x-patch, inline)]
From 6714863034f9522512cdf2d45fef402eda00df7c Mon Sep 17 00:00:00 2001 From: Thomas Danckaert <post <at> thomasdanckaert.be> Date: Mon, 6 Mar 2017 15:33:34 +0100 Subject: [PATCH] gnu: python-colorspacious: Run tests. * gnu/packages/python.scm (python-colorspacious) [native-inputs]: Add python-nose. [arguments]: Add custom 'check phase which runs nosetests. --- gnu/packages/python.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index e94aa812b..fa74d1c6f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3841,6 +3841,16 @@ To address this and enable easy cycling over arbitrary @code{kwargs}, the (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy))) + (native-inputs + `(("python-nose" ,python-nose))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ (zero? + (apply system* + `("nosetests" + ,@(find-files "colorspacious" ".*\\.py"))))))))) (home-page "https://github.com/njsmith/colorspacious") (synopsis "Python library for colorspace conversions") (description "@code{colorspacious} is a Python library that lets you -- 2.11.1
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 14:48:02 GMT) Full text and rfc822 format available.Message #73 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <post <at> thomasdanckaert.be>, b.woodcroft <at> uq.edu.au Cc: 25834 <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 06 Mar 2017 15:47:52 +0100
[Message part 1 (text/plain, inline)]
Hi Thomas! Thanks again for taking this on, and for your patience! The patches LGTM overall, but I have a couple of comments/questions. Thomas Danckaert <post <at> thomasdanckaert.be> writes: > From b73e26ce12dc2fd0b38937bc615f5071556dfd5a Mon Sep 17 00:00:00 2001 > From: Thomas Danckaert <post <at> thomasdanckaert.be> > Date: Tue, 21 Feb 2017 20:28:27 +0100 > Subject: [PATCH 3/8] gnu: python-numpy: Update to 1.12.0. > > * gnu/packages/python.scm (python-numpy): Update to 1.12.0. > [source]: Use github instead of sourceforge. > [native-inputs]: Add python-cython. > > To simplify the handling of dependency cycles (numpy documentation depends > on matplotlib, which depends on numpy), we split out the documentation into > a separate package: > (python-numpy-bootstrap, python2-numpy-bootstrap): Remove variables. > (python-numpy-documentation, python2-numpy-documentation): New variables. [...] > --- > gnu/packages/python.scm | 148 +++++++++++++++++++++++++++--------------------- > 1 file changed, 82 insertions(+), 66 deletions(-) > > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm > index c449ccb6e..d296ee1d9 100644 > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -3402,24 +3402,26 @@ between language specification and implementation aspects.") > > ;; This version of numpy is missing the documentation and is only used to > ;; build matplotlib which is required to build numpy's documentation. Note to self: Update this comment. > -(define python-numpy-bootstrap > +(define-public python-numpy > (package > - (name "python-numpy-bootstrap") > - (version "1.10.4") > + (name "python-numpy") > + (version "1.12.0") > (source > (origin > (method url-fetch) > - (uri (string-append "mirror://sourceforge/numpy/NumPy/" version > - "/numpy-" version ".tar.gz")) > + (uri (string-append > + "https://github.com/numpy/numpy/archive/v" version ".tar.gz")) > + (file-name (string-append name "-" version ".tar.gz")) > (sha256 > (base32 > - "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp")))) > + "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d")))) > (build-system python-build-system) > (inputs > `(("openblas" ,openblas) > ("lapack" ,lapack))) > (native-inputs > - `(("python-nose" ,python-nose) > + `(("python-cython" ,python-cython) > + ("python-nose" ,python-nose) > ("gfortran" ,gfortran))) > (arguments > `(#:phases > @@ -3468,8 +3470,8 @@ and Fortran code, useful linear algebra, Fourier transform, and random number > capabilities.") > (license license:bsd-3))) > > -(define python2-numpy-bootstrap > - (package-with-python2 python-numpy-bootstrap)) > +(define-public python2-numpy > + (package-with-python2 python-numpy)) > > (define-public python-munch > (package > @@ -3526,69 +3528,83 @@ Models, is a program for performing both single-SNP and SNP-set genome-wide > association studies (GWAS) on extremely large data sets.") > (license license:asl2.0))) > > -(define-public python-numpy > - (package (inherit python-numpy-bootstrap) > - (name "python-numpy") > - (outputs '("out" "doc")) > - (inputs > - `(("which" ,which) > - ,@(package-inputs python-numpy-bootstrap))) > - (propagated-inputs > - `(("python-matplotlib" ,python-matplotlib) > - ("python-pyparsing" ,python-pyparsing) > - ,@(package-propagated-inputs python-numpy-bootstrap))) > +(define-public python-numpy-documentation > + (package > + (name "python-numpy-documentation") > + (version (package-version python-numpy)) > + (source (package-source python-numpy)) > + (build-system python-build-system) > (native-inputs > - `(("pkg-config" ,pkg-config) > + `(("python-matplotlib" ,python-matplotlib) > + ("python-numpy" ,python-numpy) > + ("pkg-config" ,pkg-config) > ("python-sphinx" ,python-sphinx) > ("python-numpydoc" ,python-numpydoc) > ("texlive" ,texlive) > ("texinfo" ,texinfo) > ("perl" ,perl) > - ,@(package-native-inputs python-numpy-bootstrap))) > - (arguments > - `(,@(substitute-keyword-arguments > - (package-arguments python-numpy-bootstrap) > - ((#:phases phases) > - `(alist-cons-after > - 'install 'install-doc > - (lambda* (#:key inputs outputs #:allow-other-keys) > - ;; Make installed package available for building the > - ;; documentation > - (add-installed-pythonpath inputs outputs) > - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) > - (doc (string-append > - data "/doc/" ,name "-" > - ,(package-version python-numpy-bootstrap))) > - (info (string-append data "/info")) > - (html (string-append doc "/html")) > - (pyver ,(string-append "PYVER="))) > - (with-directory-excursion "doc" > - (mkdir-p html) > - (system* "make" "html" pyver) > - (system* "make" "latex" "PAPER=a4" pyver) > - (system* "make" "-C" "build/latex" > - "all-pdf" "PAPER=a4" pyver) > - ;; FIXME: Generation of the info file fails. > - ;; (system* "make" "info" pyver) > - ;; (mkdir-p info) > - ;; (copy-file "build/texinfo/numpy.info" > - ;; (string-append info "/numpy.info")) > - (for-each (lambda (file) > - (copy-file (string-append "build/latex" file) > - (string-append doc file))) > - '("/numpy-ref.pdf" "/numpy-user.pdf")) > - (with-directory-excursion "build/html" > - (for-each (lambda (file) > - (let* ((dir (dirname file)) > - (tgt-dir (string-append html "/" dir))) > - (unless (equal? "." dir) > - (mkdir-p tgt-dir)) > - (install-file file html))) > - (find-files "." ".*")))))) > - ,phases))))))) > + ("scipy-sphinx-theme" > + ,(origin ; The build script expects scipy-sphinx-theme as a git submodule > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/scipy/scipy-sphinx-theme.git") > + (commit "c466764e22"))) > + (sha256 > + (base32 > + "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))) Do you know if packaging this would work? Also, please use full commit hashes. I will add this and fix indentation before pushing. > + ,@(package-native-inputs python-numpy))) > + (arguments > + `(#:tests? #f ; we're only generating the documentation > + #:phases > + (modify-phases %standard-phases > + (delete 'build) > + (replace 'install > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((data (string-append (assoc-ref outputs "out") "/share")) > + (doc (string-append > + data "/doc/" ,name "-" > + ,(package-version python-numpy))) > + (info-reader (string-append data "/info")) > + (html (string-append doc "/html")) > + (scipy-sphinx-theme "scipy-sphinx-theme") > + (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme)) > + (pyver ,(string-append "PYVER="))) > + (with-directory-excursion "doc" > + (copy-recursively sphinx-theme-checkout scipy-sphinx-theme) > + (mkdir-p html) > + (system* "make" "html" pyver) > + (system* "make" "latex" "PAPER=a4" pyver) > + (system* "make" "-C" "build/latex" > + "all-pdf" "PAPER=a4" pyver) > + ;; FIXME: Generation of the info file fails. > + ;; (system* "make" "info" pyver) > + ;; (mkdir-p info) > + ;; (copy-file "build/texinfo/numpy.info" > + ;; (string-append info "/numpy.info")) > + (for-each (lambda (file) > + (copy-file (string-append "build/latex" file) > + (string-append doc file))) > + '("/numpy-ref.pdf" "/numpy-user.pdf")) > + (with-directory-excursion "build/html" > + (for-each (lambda (file) > + (let* ((dir (dirname file)) > + (tgt-dir (string-append html "/" dir))) > + (unless (equal? "." dir) > + (mkdir-p tgt-dir)) > + (install-file file html))) > + (find-files "." ".*"))))) > + #t))))) > + (home-page (package-home-page python-numpy)) > + (synopsis "Documentation for the python-numpy package") > + (description (package-description python-numpy)) > + (license (package-license python-numpy)))) > > -(define-public python2-numpy > - (package-with-python2 python-numpy)) > +(define-public python2-numpy-documentation > + (let ((numpy-documentation (package-with-python2 python-numpy-documentation))) > + (package > + (inherit numpy-documentation) > + (native-inputs `(("python2-functools32" ,python2-functools32) > + ,@(package-native-inputs numpy-documentation)))))) Do we need a python2 variant of the documentation? Does it differ from the python3 variant? Actually these were my only questions (but it applies to matplotlib documentation as well). The patches LGTM, great work!
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 17:54:01 GMT) Full text and rfc822 format available.Message #76 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <thomas.danckaert <at> gmail.com>, 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: Re: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Mon, 06 Mar 2017 18:53:39 +0100
[Message part 1 (text/plain, inline)]
Thomas Danckaert <thomas.danckaert <at> gmail.com> writes: > From: Thomas Danckaert <post <at> thomasdanckaert.be> > > * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. > [source]: Remove Tk backend patch, use Github instead of Sourceforge. > [outputs]: Remove "doc" output. > [propagated-inputs]: Add python-cycler. > [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. > (python-matplotlib-documentation, python2-matplotlib-documentation): New > variable. > * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. > * gnu/local.mk (dist_patch_DATA): Remove patch. Apparently the python2 variant of this package requires "python2-subprocess32". Could you look into packaging it? It also requires "python2-functools32", but this dependency is removed again in the matplotlib master branch. I have this in my local branch. I found these dependencies by building dependent packages. Too bad the setup script only prints a warning if they are not found, instead of failing.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 21:49:02 GMT) Full text and rfc822 format available.Message #79 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <thomas.danckaert <at> gmail.com>, 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: Re: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Mon, 06 Mar 2017 22:48:43 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes: > Thomas Danckaert <thomas.danckaert <at> gmail.com> writes: > >> From: Thomas Danckaert <post <at> thomasdanckaert.be> >> >> * gnu/packages/python.scm (python-matplotlib): Update to 2.0.0. >> [source]: Remove Tk backend patch, use Github instead of Sourceforge. >> [outputs]: Remove "doc" output. >> [propagated-inputs]: Add python-cycler. >> [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. >> (python-matplotlib-documentation, python2-matplotlib-documentation): New >> variable. >> * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. >> * gnu/local.mk (dist_patch_DATA): Remove patch. > > Apparently the python2 variant of this package requires > "python2-subprocess32". Could you look into packaging it? I've packaged it (attached). I intended to apply these patches on a new 'python-updates' branch so we could deal with the fallout more leisurely, but since there are already failures after the scipy update, we might as well jump in it. I have updates for python-statsmodels and python-pandas in my queue as well. Doing a final round of building dependent packages now, will probably push later tonight.
[0001-gnu-Add-python2-subprocess32.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#25834
; Package guix-patches
.
(Mon, 06 Mar 2017 22:37:01 GMT) Full text and rfc822 format available.Message #82 received at 25834 <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <thomas.danckaert <at> gmail.com>, 25834 <at> debbugs.gnu.org Cc: Thomas Danckaert <post <at> thomasdanckaert.be> Subject: Re: bug#25834: [PATCH 5/7] gnu: python-matplotlib: Update to 2.0.0. Date: Mon, 06 Mar 2017 23:35:58 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes: > I have updates for python-statsmodels and python-pandas in my queue as > well. Doing a final round of building dependent packages now, will > probably push later tonight. And it's live! Thanks again for taking this on. Wrt colorspacious tests, I usually look at how upstream runs their tests, typically in ".travis.yml" or "tox.ini". Will have a look at the patch before closing this bug.
[signature.asc (application/pgp-signature, inline)]
Marius Bakke <mbakke <at> fastmail.com>
:Thomas Danckaert <post <at> thomasdanckaert.be>
:Message #87 received at 25834-done <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <mbakke <at> fastmail.com> To: Thomas Danckaert <post <at> thomasdanckaert.be> Cc: dannym <at> scratchpost.org, 25834-done <at> debbugs.gnu.org Subject: Re: bug#25834: [PATCH] Update scipy stack. Date: Mon, 06 Mar 2017 23:53:42 +0100
[Message part 1 (text/plain, inline)]
Thomas Danckaert <post <at> thomasdanckaert.be> writes: > From: Marius Bakke <mbakke <at> fastmail.com> > Subject: Re: bug#25834: [PATCH] Update scipy stack. > Date: Mon, 06 Mar 2017 14:25:26 +0100 > >> Please pay attention during the 'check' phase of Python packages -- >> both >> colorspacious and the shutils backport prints 'Ran 0 tests in...'. >> Usually this is a sign that they require some other command than >> 'python >> setup.py test', which is the default of python-build-system. >> >> I pushed a fix for python2-backports-shutil-get-terminal-size that >> I had >> in my queue, but it would be nice to enable tests on colorspacious >> as >> well. Any takers? :) > > I've attached an attempt (now runs 34 tests). Am I right that > running “nosetests colorspacious/*.py” is the only way to make it run > the tests in this case? Thanks! By adding "--all-modules" to the "nosetests" invocation, it was able to discover the tests without having to add them as arguments. Pushed! Closing this bug now, wahoo!
[signature.asc (application/pgp-signature, inline)]
Marius Bakke <mbakke <at> fastmail.com>
:Thomas Danckaert <post <at> thomasdanckaert.be>
:Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Tue, 04 Apr 2017 11:24:03 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.