From 31557440c29f8d93b366422bfec4dab341eff79f Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Sun, 14 Dec 2014 19:57:36 +0100 Subject: gnu: python-numpy-bootstrap: Reduce matrix size in failing test. * gnu/packages/python.scm (python-numpy-bootstrap): Add phase 'fix-failing-tests. --- gnu/packages/python.scm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index dc7def5507..183fd54ac8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1928,17 +1928,24 @@ writing C extensions for Python as easy as Python itself.") (string-append (assoc-ref inputs "atlas") "/lib/libsatlas.so")))) (setenv "ATLAS" atlas-lib))) - ;; 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 numpy; numpy.test(verbose=2)")))) - (alist-delete - 'check - %standard-phases))))) + (alist-cons-before + 'check 'fix-failing-tests + (lambda _ + (substitute* (find-files "numpy/linalg/tests" + "test_regression\\.py") + (("x = np.eye(1000, 66)") + "x = np.eye(10, 66)"))) + ;; 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 numpy; numpy.test(verbose=2)")))) + (alist-delete + 'check + %standard-phases)))))) (home-page "http://www.numpy.org/") (synopsis "Fundamental package for scientific computing with Python") (description "NumPy is the fundamental package for scientific computing -- cgit v1.3 From 6a843168489faa0873a33990037aaa8844bf0d23 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Tue, 16 Dec 2014 18:34:37 +0100 Subject: Revert "gnu: python-numpy-bootstrap: Reduce matrix size in failing test." This reverts commit 31557440c29f8d93b366422bfec4dab341eff79f as it did not provide the desired effect. The test is still failing. --- gnu/packages/python.scm | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 183fd54ac8..dc7def5507 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1928,24 +1928,17 @@ writing C extensions for Python as easy as Python itself.") (string-append (assoc-ref inputs "atlas") "/lib/libsatlas.so")))) (setenv "ATLAS" atlas-lib))) - (alist-cons-before - 'check 'fix-failing-tests - (lambda _ - (substitute* (find-files "numpy/linalg/tests" - "test_regression\\.py") - (("x = np.eye(1000, 66)") - "x = np.eye(10, 66)"))) - ;; 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 numpy; numpy.test(verbose=2)")))) - (alist-delete - 'check - %standard-phases)))))) + ;; 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 numpy; numpy.test(verbose=2)")))) + (alist-delete + 'check + %standard-phases))))) (home-page "http://www.numpy.org/") (synopsis "Fundamental package for scientific computing with Python") (description "NumPy is the fundamental package for scientific computing -- cgit v1.3 From 6fa144692cd21336f99eae63c426bab404d68913 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Wed, 10 Dec 2014 20:36:58 +0100 Subject: gnu: Add xcffib * gnu/packages/python.scm (python-xcffib, python2-xcffib): New variables. --- gnu/packages/python.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index dc7def5507..2e64359705 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -50,6 +50,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages which) #:use-module (gnu packages perl) + #:use-module (gnu packages xorg) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -2542,3 +2543,45 @@ a front-end for C compilers or analysis tools.") (define-public python2-cffi (package-with-python2 python-cffi)) + +(define-public python-xcffib + (package + (name "python-xcffib") + (version "0.1.9") + (source + (origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/source/x/" + "xcffib/xcffib-" version ".tar.gz")) + (sha256 + (base32 + "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81")))) + (build-system python-build-system) + (inputs + `(("libxcb" ,libxcb) + ("python-six" ,python-six))) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (propagated-inputs + `(("python-cffi" ,python-cffi))) ; used at run time + (arguments + `(#:phases + (alist-cons-after + 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") "/share" + "/doc/" ,name "-" ,version))) + (mkdir-p doc) + (copy-file "README.md" + (string-append doc "/README.md")))) + %standard-phases))) + (home-page "https://github.com/tych0/xcffib") + (synopsis "XCB Python bindings") + (description + "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds +support for Python 3 and PyPy. It is based on cffi.") + (license expat))) + +(define-public python2-xcffib + (package-with-python2 python-xcffib)) + -- cgit v1.3 From 25f9a068f2c486616fc7e92702be77a743422732 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Thu, 11 Dec 2014 14:26:13 +0100 Subject: gnu: matplotlib: Add gtk3 backends and optional dependency. Adjust inputs. * gnu/packages/python.scm (python-matplotlib, python2-matplotlib): Add gtk3 backends with the necessary inputs and a 'configure-environment' phase. Add the optional 'python-pillow' dependency. Move 'python-pyparsing' from 'inputs' to 'propagated-inputs' as it is required at run time. --- gnu/packages/python.scm | 128 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 41 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2e64359705..dbafedd454 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -51,6 +51,8 @@ #:use-module (gnu packages which) #:use-module (gnu packages perl) #:use-module (gnu packages xorg) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -2118,10 +2120,35 @@ that client code uses to construct the grammar directly in Python code.") "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp")))) (build-system python-build-system) (outputs '("out" "doc")) + (propagated-inputs ; the following packages are all needed at run time + `(("python-pyparsing" ,python-pyparsing) + ("python-pygobject" ,python-pygobject) + ("gobject-introspection" ,gobject-introspection) + ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated + ;; from 'gtk+') provides the required 'typelib' files used by + ;; 'gobject-introspection'. The location of these files is set with the + ;; help of the environment variable GI_TYPELIB_PATH. At build time this + ;; is done automatically by a 'native-search-path' procedure. However, + ;; at run-time the user must set this variable as follows: + ;; + ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0 + ;; + ;; 'typelib' files include references to dynamic libraries. Currently + ;; the references do not include the full path to the libraries. For + ;; this reason the user must set the LD_LIBRARY_PATH to the location of + ;; 'libgtk-3.so.0', 'libgdk-3.so.0' and 'libatk-1.0.so.0': + ;; + ;; export LD_LIBRARY_PATH=~/.guix-profile/lib + ("gtk+" ,gtk+) + ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of + ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' + ;; object. For this reason we need to import both libraries. + ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo + ("python-pycairo" ,python-pycairo) + ("python-cairocffi" ,python-cairocffi))) (inputs `(("python-setuptools" ,python-setuptools) ("python-dateutil" ,python-dateutil-2) - ("python-pyparsing" ,python-pyparsing) ("python-six" ,python-six) ("python-pytz" ,python-pytz) ("python-numpy" ,python-numpy-bootstrap) @@ -2132,10 +2159,10 @@ that client code uses to construct the grammar directly in Python code.") ("libpng" ,libpng) ("imagemagick" ,imagemagick) ("freetype" ,freetype) + ("cairo" ,cairo) + ("glib" ,glib) + ("python-pillow" ,python-pillow) ;; FIXME: Add backends when available. - ;("python-pygtk" ,python-pygtk) - ;("python-pycairo" ,python-pycairo) - ;("python-pygobject" ,python-pygobject) ;("python-wxpython" ,python-wxpython) ;("python-pyqt" ,python-pyqt) )) @@ -2145,40 +2172,51 @@ that client code uses to construct the grammar directly in Python code.") ("texinfo" ,texinfo))) (arguments `(#:phases - (alist-cons-after - 'install 'install-doc - (lambda* (#:key 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"))) - (with-directory-excursion "doc" - ;; Without setting this variable we get an encoding error. - (setenv "LANG" "en_US.UTF-8") - ;; 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") - (system* "python" "make.py" "latex") - (system* "python" "make.py" "texinfo") - (copy-file "build/texinfo/matplotlib.info" - (string-append info "/matplotlib.info")) - (copy-file "build/latex/Matplotlib.pdf" - (string-append doc "/Matplotlib.pdf")) - (with-directory-excursion "build/html" - (map (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (unless (equal? "." dir) - (mkdir-p tgt-dir)) - (copy-file file (string-append html "/" file)))) - (find-files "." ".*")))))) - %standard-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. + ;; + ;; FIXME: setting LD_LIBRARY_PATH should be removed once we patch + ;; gobject-introspection to include the full path of shared + ;; libraries in 'typelib' files. + (setenv "LD_LIBRARY_PATH" + (string-append cairo "/lib:" gtk+ "/lib")) + (setenv "HOME" (getcwd)) + (call-with-output-file "setup.cfg" + (lambda (port) + (format port "[rc_options]~% +backend = GTK3Agg~%"))))) + (alist-cons-after + 'install 'install-doc + (lambda* (#:key 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"))) + (with-directory-excursion "doc" + ;; Without setting this variable we get an encoding error. + (setenv "LANG" "en_US.UTF-8") + ;; 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") + (system* "python" "make.py" "latex") + (system* "python" "make.py" "texinfo") + (copy-file "build/texinfo/matplotlib.info" + (string-append info "/matplotlib.info")) + (copy-file "build/latex/Matplotlib.pdf" + (string-append doc "/Matplotlib.pdf")) + (copy-recursively "build/html" html)))) + %standard-phases)))) (home-page "http://matplotlib.org") (synopsis "2D plotting library for Python") (description @@ -2194,9 +2232,17 @@ toolkits.") (package (inherit matplotlib) ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is ;; customized for Python 2. - (inputs `(("python2-numpydoc" ,python2-numpydoc) - ,@(alist-delete "python-numpydoc" - (package-inputs matplotlib))))))) + (propagated-inputs + `(("python2-py2cairo" ,python2-py2cairo) + ("python2-pygobject-2" ,python2-pygobject-2) + ,@(alist-delete "python-pycairo" + (alist-delete "python-pygobject" + (package-propagated-inputs + matplotlib))))) + (inputs + `(("python2-numpydoc" ,python2-numpydoc) + ,@(alist-delete "python-numpydoc" + (package-inputs matplotlib))))))) ;; Scipy 0.14.0 with Numpy 0.19.X fails several tests. This is known and ;; planned to be fixed in 0.14.1. It is claimed that the failures can safely -- cgit v1.3 From 9e0997230cf00c6896aa736052bbcb3b7902b949 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Thu, 18 Dec 2014 21:54:05 +0100 Subject: gnu: cairocffi: Move to python module. * gnu/packages/gtk.scm, gnu/packages/python.scm (python-cairocffi, python2-cairocffi): Move variables from gtk to python module to avoid circular dependency. Reported by Mark H Weaver --- gnu/packages/gtk.scm | 57 ------------------------------------------------- gnu/packages/python.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index e69fc44bbe..8646397aad 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -696,63 +696,6 @@ extensive documentation, including API reference and a tutorial.") ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1 (license (list license:lgpl2.1 license:mpl1.1)))) -(define-public python-cairocffi - (package - (name "python-cairocffi") - (version "0.6") - (source - (origin - (method url-fetch) - ;; The archive on pypi is missing the 'utils' directory! - (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v" - version ".tar.gz")) - (sha256 - (base32 - "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51")))) - (build-system python-build-system) - (outputs '("out" "doc")) - (inputs - `(("gdk-pixbuf" ,gdk-pixbuf) - ("cairo" ,cairo))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx) - ("python-docutils" ,python-docutils) - ("python-setuptools" ,python-setuptools))) - (propagated-inputs - `(("python-xcffib" ,python-xcffib))) ; used at run time - (arguments - `(#:phases - (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"))) - (setenv "LD_LIBRARY_PATH" - (string-append (assoc-ref inputs "cairo") "/lib" ":" - (assoc-ref inputs "gdk-pixbuf") "/lib")) - (setenv "LANG" "en_US.UTF-8") - (mkdir-p html) - (for-each (lambda (file) - (copy-file (string-append "." file) - (string-append doc file))) - '("/README.rst" "/CHANGES" "/LICENSE")) - (system* "python" "setup.py" "build_sphinx") - (copy-recursively "docs/_build/html" html))) - %standard-phases))) - (home-page "https://github.com/SimonSapin/cairocffi") - (synopsis "Python bindings and object-oriented API for Cairo") - (description - "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of -Python bindings and object-oriented API for cairo. Cairo is a 2D vector -graphics library with support for multiple backends including image buffers, -PNG, PostScript, PDF, and SVG file output.") - (license license:bsd-3))) - -(define-public python2-cairocffi - (package-with-python2 python-cairocffi)) - (define-public python2-pygtk (package (name "python2-pygtk") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index dbafedd454..f81ab695af 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2631,3 +2631,60 @@ support for Python 3 and PyPy. It is based on cffi.") (define-public python2-xcffib (package-with-python2 python-xcffib)) +(define-public python-cairocffi + (package + (name "python-cairocffi") + (version "0.6") + (source + (origin + (method url-fetch) + ;; The archive on pypi is missing the 'utils' directory! + (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51")))) + (build-system python-build-system) + (outputs '("out" "doc")) + (inputs + `(("gdk-pixbuf" ,gdk-pixbuf) + ("cairo" ,cairo))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python-sphinx" ,python-sphinx) + ("python-docutils" ,python-docutils) + ("python-setuptools" ,python-setuptools))) + (propagated-inputs + `(("python-xcffib" ,python-xcffib))) ; used at run time + (arguments + `(#:phases + (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"))) + (setenv "LD_LIBRARY_PATH" + (string-append (assoc-ref inputs "cairo") "/lib" ":" + (assoc-ref inputs "gdk-pixbuf") "/lib")) + (setenv "LANG" "en_US.UTF-8") + (mkdir-p html) + (for-each (lambda (file) + (copy-file (string-append "." file) + (string-append doc file))) + '("/README.rst" "/CHANGES" "/LICENSE")) + (system* "python" "setup.py" "build_sphinx") + (copy-recursively "docs/_build/html" html))) + %standard-phases))) + (home-page "https://github.com/SimonSapin/cairocffi") + (synopsis "Python bindings and object-oriented API for Cairo") + (description + "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of +Python bindings and object-oriented API for cairo. Cairo is a 2D vector +graphics library with support for multiple backends including image buffers, +PNG, PostScript, PDF, and SVG file output.") + (license bsd-3))) + +(define-public python2-cairocffi + (package-with-python2 python-cairocffi)) + -- cgit v1.3 From afc720d34c43a2fcf0b5871226c15ad6c5f73697 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Tue, 23 Dec 2014 17:51:40 +0100 Subject: gnu: matplotlib: Comment out python2-matplotlib. * gnu/packages/python.scm (python2-matplotlib, python2-scipy, python2-numpy): Comment out python2-matplotlib and the packages making use of it as the generation of the derivation of these packages takes very long. --- gnu/packages/python.scm | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f81ab695af..2ff258fb4b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2011,17 +2011,17 @@ capabilities.") (find-files "." ".*")))))) ,phases))))))) -(define-public python2-numpy - (let ((numpy (package-with-python2 python-numpy))) - (package (inherit numpy) - ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is customized for - ;; Python 2. Since it is also an input to PYTHON2-MATPLOTLIB, we need to - ;; import the right version of 'matplotlib' as well. - (inputs `(("python2-numpydoc" ,python2-numpydoc) - ("python2-matplotlib" ,python2-matplotlib) - ,@(alist-delete "python-numpydoc" - (alist-delete "python-matplotlib" - (package-inputs numpy)))))))) +;; (define-public python2-numpy +;; (let ((numpy (package-with-python2 python-numpy))) +;; (package (inherit numpy) +;; ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is customized for +;; ;; Python 2. Since it is also an input to PYTHON2-MATPLOTLIB, we need to +;; ;; import the right version of 'matplotlib' as well. +;; (inputs `(("python2-numpydoc" ,python2-numpydoc) +;; ("python2-matplotlib" ,python2-matplotlib) +;; ,@(alist-delete "python-numpydoc" +;; (alist-delete "python-matplotlib" +;; (package-inputs numpy)))))))) (define-public python-pyparsing (package @@ -2227,22 +2227,22 @@ ipython shell, web application servers, and six graphical user interface toolkits.") (license psfl))) -(define-public python2-matplotlib - (let ((matplotlib (package-with-python2 python-matplotlib))) - (package (inherit matplotlib) - ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is - ;; customized for Python 2. - (propagated-inputs - `(("python2-py2cairo" ,python2-py2cairo) - ("python2-pygobject-2" ,python2-pygobject-2) - ,@(alist-delete "python-pycairo" - (alist-delete "python-pygobject" - (package-propagated-inputs - matplotlib))))) - (inputs - `(("python2-numpydoc" ,python2-numpydoc) - ,@(alist-delete "python-numpydoc" - (package-inputs matplotlib))))))) +;; (define-public python2-matplotlib +;; (let ((matplotlib (package-with-python2 python-matplotlib))) +;; (package (inherit matplotlib) +;; ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is +;; ;; customized for Python 2. +;; (propagated-inputs +;; `(("python2-py2cairo" ,python2-py2cairo) +;; ("python2-pygobject-2" ,python2-pygobject-2) +;; ,@(alist-delete "python-pycairo" +;; (alist-delete "python-pygobject" +;; (package-propagated-inputs +;; matplotlib))))) +;; (inputs +;; `(("python2-numpydoc" ,python2-numpydoc) +;; ,@(alist-delete "python-numpydoc" +;; (package-inputs matplotlib))))))) ;; Scipy 0.14.0 with Numpy 0.19.X fails several tests. This is known and ;; planned to be fixed in 0.14.1. It is claimed that the failures can safely @@ -2341,15 +2341,15 @@ the SciPy stack. It provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization.") (license bsd-3))) -(define-public python2-scipy - (let ((scipy (package-with-python2 python-scipy))) - (package (inherit scipy) - ;; Use packages customized for python-2. - (inputs `(("python2-matplotlib" ,python2-matplotlib) - ("python2-numpy" ,python2-numpy) - ,@(alist-delete "python-matplotlib" - (alist-delete "python-numpy" - (package-inputs scipy)))))))) +;; (define-public python2-scipy +;; (let ((scipy (package-with-python2 python-scipy))) +;; (package (inherit scipy) +;; ;; Use packages customized for python-2. +;; (inputs `(("python2-matplotlib" ,python2-matplotlib) +;; ("python2-numpy" ,python2-numpy) +;; ,@(alist-delete "python-matplotlib" +;; (alist-delete "python-numpy" +;; (package-inputs scipy)))))))) (define-public python-sqlalchemy (package -- cgit v1.3 From 764c077b307f0a9cdc800494da552077d6d23895 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 23 Dec 2014 19:17:17 +0100 Subject: Revert "gnu: matplotlib: Comment out python2-matplotlib." This reverts commit afc720d34c43a2fcf0b5871226c15ad6c5f73697. --- gnu/packages/python.scm | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2ff258fb4b..f81ab695af 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2011,17 +2011,17 @@ capabilities.") (find-files "." ".*")))))) ,phases))))))) -;; (define-public python2-numpy -;; (let ((numpy (package-with-python2 python-numpy))) -;; (package (inherit numpy) -;; ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is customized for -;; ;; Python 2. Since it is also an input to PYTHON2-MATPLOTLIB, we need to -;; ;; import the right version of 'matplotlib' as well. -;; (inputs `(("python2-numpydoc" ,python2-numpydoc) -;; ("python2-matplotlib" ,python2-matplotlib) -;; ,@(alist-delete "python-numpydoc" -;; (alist-delete "python-matplotlib" -;; (package-inputs numpy)))))))) +(define-public python2-numpy + (let ((numpy (package-with-python2 python-numpy))) + (package (inherit numpy) + ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is customized for + ;; Python 2. Since it is also an input to PYTHON2-MATPLOTLIB, we need to + ;; import the right version of 'matplotlib' as well. + (inputs `(("python2-numpydoc" ,python2-numpydoc) + ("python2-matplotlib" ,python2-matplotlib) + ,@(alist-delete "python-numpydoc" + (alist-delete "python-matplotlib" + (package-inputs numpy)))))))) (define-public python-pyparsing (package @@ -2227,22 +2227,22 @@ ipython shell, web application servers, and six graphical user interface toolkits.") (license psfl))) -;; (define-public python2-matplotlib -;; (let ((matplotlib (package-with-python2 python-matplotlib))) -;; (package (inherit matplotlib) -;; ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is -;; ;; customized for Python 2. -;; (propagated-inputs -;; `(("python2-py2cairo" ,python2-py2cairo) -;; ("python2-pygobject-2" ,python2-pygobject-2) -;; ,@(alist-delete "python-pycairo" -;; (alist-delete "python-pygobject" -;; (package-propagated-inputs -;; matplotlib))))) -;; (inputs -;; `(("python2-numpydoc" ,python2-numpydoc) -;; ,@(alist-delete "python-numpydoc" -;; (package-inputs matplotlib))))))) +(define-public python2-matplotlib + (let ((matplotlib (package-with-python2 python-matplotlib))) + (package (inherit matplotlib) + ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is + ;; customized for Python 2. + (propagated-inputs + `(("python2-py2cairo" ,python2-py2cairo) + ("python2-pygobject-2" ,python2-pygobject-2) + ,@(alist-delete "python-pycairo" + (alist-delete "python-pygobject" + (package-propagated-inputs + matplotlib))))) + (inputs + `(("python2-numpydoc" ,python2-numpydoc) + ,@(alist-delete "python-numpydoc" + (package-inputs matplotlib))))))) ;; Scipy 0.14.0 with Numpy 0.19.X fails several tests. This is known and ;; planned to be fixed in 0.14.1. It is claimed that the failures can safely @@ -2341,15 +2341,15 @@ the SciPy stack. It provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization.") (license bsd-3))) -;; (define-public python2-scipy -;; (let ((scipy (package-with-python2 python-scipy))) -;; (package (inherit scipy) -;; ;; Use packages customized for python-2. -;; (inputs `(("python2-matplotlib" ,python2-matplotlib) -;; ("python2-numpy" ,python2-numpy) -;; ,@(alist-delete "python-matplotlib" -;; (alist-delete "python-numpy" -;; (package-inputs scipy)))))))) +(define-public python2-scipy + (let ((scipy (package-with-python2 python-scipy))) + (package (inherit scipy) + ;; Use packages customized for python-2. + (inputs `(("python2-matplotlib" ,python2-matplotlib) + ("python2-numpy" ,python2-numpy) + ,@(alist-delete "python-matplotlib" + (alist-delete "python-numpy" + (package-inputs scipy)))))))) (define-public python-sqlalchemy (package -- cgit v1.3 From be7134bf752c8223276f4f8ef12f67d52264474c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 23 Dec 2014 12:41:31 +0100 Subject: gnu: Add pysam. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python.scm (python-pysam, python2-pysam): New variables. Signed-off-by: Ludovic Courtès --- gnu/packages/python.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f81ab695af..adb84fc5b7 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -37,6 +37,7 @@ #:use-module (gnu packages openssl) #:use-module (gnu packages elf) #:use-module (gnu packages maths) + #:use-module (gnu packages ncurses) #:use-module (gnu packages gcc) #:use-module (gnu packages pkg-config) #:use-module (gnu packages databases) @@ -617,6 +618,43 @@ get the local timezone information, unless you know the zoneinfo name, and under several distributions that's hard or impossible to figure out.") (license cc0))) +(define-public python-pysam + (package + (name "python-pysam") + (version "0.8.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-" + version ".tar.gz")) + (sha256 + (base32 + "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; tests are excluded in the manifest + #:phases + (alist-cons-before + 'build 'set-flags + (lambda _ + (setenv "LDFLAGS" "-lncurses") + (setenv "CFLAGS" "-D_CURSES_LIB=1")) + %standard-phases))) + (inputs + `(("python-cython" ,python-cython) + ("python-setuptools" ,python-setuptools) + ("ncurses" ,ncurses) + ("zlib" ,zlib))) + (home-page "https://github.com/pysam-developers/pysam") + (synopsis "Python bindings to the SAMtools C API") + (description + "Pysam is a Python module for reading and manipulating files in the +SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It +also includes an interface for tabix.") + (license expat))) + +(define-public python2-pysam + (package-with-python2 python-pysam)) (define-public python2-pysqlite (package -- cgit v1.3