From f882d7c7c5c3f0c0cf7b26ba51fc0c80d1704fba Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 28 Aug 2018 15:15:29 +0200 Subject: gnu: python-apipkg: Update home page. * gnu/packages/python.scm (python-apipkg)[home-page]: Update. --- gnu/packages/python.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 6ab6763a96..33bbc28edf 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7378,7 +7378,7 @@ applications.") (description "With apipkg you can control the exported namespace of a Python package and greatly reduce the number of imports for your users. It is a small pure Python module that works on virtually all Python versions.") - (home-page "https://bitbucket.org/hpk42/apipkg") + (home-page "https://github.com/pytest-dev/apipkg") (license license:expat))) (define-public python2-apipkg -- cgit 1.4.1 From d8b8eb3ff5453676ffd5251f17424dad5e9966e8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 20 Aug 2018 20:00:17 +0200 Subject: gnu: Add python-numba. * gnu/packages/python.scm (python-numba): New variable. --- gnu/packages/python.scm | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 33bbc28edf..7575ab1859 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -99,6 +99,7 @@ #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) #:use-module (gnu packages machine-learning) #:use-module (gnu packages man) #:use-module (gnu packages maths) @@ -13895,3 +13896,86 @@ Let's Encrypt.") development that supports command line argument parsing, command string validation testing and application logic.") (license license:expat))) + +;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with +;; python-numba. They have a very unflexible relationship. +(define-public python-numba + (package + (name "python-numba") + (version "0.39.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "numba" version)) + (sha256 + (base32 + "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07")))) + (build-system python-build-system) + (arguments + `(#:modules ((guix build utils) + (guix build python-build-system) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-proprietary-features + (lambda _ + (setenv "NUMBA_DISABLE_HSA" "1") + (setenv "NUMBA_DISABLE_CUDA" "1") + #t)) + (add-after 'unpack 'remove-failing-tests + (lambda _ + ;; FIXME: these tests fail for unknown reasons: + ;; test_non_writable_pycache, test_non_creatable_pycache, and + ;; test_frozen (all in numba.tests.test_dispatcher.TestCache). + (substitute* "numba/tests/test_dispatcher.py" + (("def test(_non_writable_pycache)" _ m) + (string-append "def guix_skip" m)) + (("def test(_non_creatable_pycache)" _ m) + (string-append "def guix_skip" m)) + (("def test(_frozen)" _ m) + (string-append "def guix_skip" m))) + + ;; These tests fail because we don't run the tests from the build + ;; directory: test_setup_py_distutils, test_setup_py_setuptools + ;; They ar in numba.tests.test_pycc.TestDistutilsSupport. + (substitute* "numba/tests/test_pycc.py" + (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m) + (string-append "def guix_skip" m))) + #t)) + (replace 'check + (lambda _ + (let ((cwd (getcwd))) + (setenv "PYTHONPATH" + (string-append cwd "/build/" + (find (cut string-prefix? "lib" <>) + (scandir (string-append cwd "/build"))) + ":" + (getenv "PYTHONPATH"))) + ;; Something is wrong with the PYTHONPATH when running the + ;; tests from the build directory, as it complains about not being + ;; able to import certain modules. + (with-directory-excursion "/tmp" + (invoke "python3" "-m" "numba.runtests" "-v" "-m"))) + #t))))) + (propagated-inputs + `(("python-llvmlite" ,python-llvmlite) + ("python-numpy" ,python-numpy) + ("python-singledispatch" ,python-singledispatch))) + ;; Needed for tests. + (inputs + `(("python-jinja2" ,python-jinja2) + ("python-pygments" ,python-pygments))) + (home-page "https://numba.pydata.org") + (synopsis "Compile Python code using LLVM") + (description "Numba gives you the power to speed up your applications with +high performance functions written directly in Python. With a few +annotations, array-oriented and math-heavy Python code can be just-in-time +compiled to native machine instructions, similar in performance to C, C++ and +Fortran, without having to switch languages or Python interpreters. + +Numba works by generating optimized machine code using the LLVM compiler +infrastructure at import time, runtime, or statically (using the included pycc +tool).") + (license license:bsd-3))) -- cgit 1.4.1 From 22b770ce0003b7d6fe98299292f8f5c0569f0712 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 20 Aug 2018 20:00:18 +0200 Subject: gnu: Add python-anndata. * gnu/packages/python.scm (python-anndata): New variable. --- gnu/packages/python.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7575ab1859..f59e24d5ff 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -13979,3 +13979,29 @@ Numba works by generating optimized machine code using the LLVM compiler infrastructure at import time, runtime, or statically (using the included pycc tool).") (license license:bsd-3))) + +(define-public python-anndata + (package + (name "python-anndata") + (version "0.6.9") + (source + (origin + (method url-fetch) + (uri (pypi-uri "anndata" version)) + (sha256 + (base32 + "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi")))) + (build-system python-build-system) + (propagated-inputs + `(("python-h5py" ,python-h5py) + ("python-natsort" ,python-natsort) + ("python-pandas" ,python-pandas) + ("python-scipy" ,python-scipy))) + (home-page "https://github.com/theislab/anndata") + (synopsis "Annotated data for data analysis pipelines") + (description "Anndata is a package for simple (functional) high-level APIs +for data analysis pipelines. In this context, it provides an efficient, +scalable way of keeping track of data together with learned annotations and +reduces the code overhead typically encountered when using a mostly +object-oriented library such as @code{scikit-learn}.") + (license license:bsd-3))) -- cgit 1.4.1 From 9ce2f07ab6c614ea0afda3bdac601bdc0ef958c9 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 31 Aug 2018 16:37:00 +0200 Subject: gnu: python-matplotlib: Use python-pyqt-without-qtwebkit. * gnu/packages/python.scm (python-matplotlib)[propagated-inputs]: Replace python-pyqt with python-pyqt-without-qtwebkit. --- gnu/packages/python.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f59e24d5ff..fd1fdbf82d 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3503,7 +3503,8 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. ;; object. For this reason we need to import both libraries. ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo ("python-pycairo" ,python-pycairo) - ("python-pyqt" ,python-pyqt) + ;; XXX: qtwebkit cannot be built reliably. + ("python-pyqt" ,python-pyqt-without-qtwebkit) ("python-cairocffi" ,python-cairocffi))) (inputs `(("libpng" ,libpng) -- cgit 1.4.1 From 02ddafef5516c23caa91c821926774f618e48ad0 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 3 Sep 2018 13:47:01 +0200 Subject: gnu: python-scipy: Disable broken tests. * gnu/packages/python.scm (python-scipy)[arguments]: Skip two broken tests. --- gnu/packages/python.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fd1fdbf82d..9fdadfbd73 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3755,6 +3755,18 @@ functions.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-broken-tests + (lambda _ + (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py" + (("^( +)def test_threads_parallel\\(self\\):" m indent) + (string-append indent + "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" + m))) + (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py" + (("^def test_parallel_threads\\(\\):" m) + (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" + m))) + #t)) (add-before 'build 'configure-openblas (lambda* (#:key inputs #:allow-other-keys) (call-with-output-file "site.cfg" -- cgit 1.4.1 From 1f7d142000ad15d037cf3d934f7b6233f3a5b434 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 1 Sep 2018 19:27:01 +0200 Subject: gnu: python-matplotlib: Update to 2.2.3. * gnu/packages/python.scm (python-matplotlib): Update to 2.2.3. --- gnu/packages/python.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9fdadfbd73..8cf5550f81 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3468,14 +3468,14 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. (define-public python-matplotlib (package (name "python-matplotlib") - (version "2.2.2") + (version "2.2.3") (source (origin (method url-fetch) (uri (pypi-uri "matplotlib" version)) (sha256 (base32 - "1s6dv225w3k4fv52h8lfjc7qq5y56i9755ayx0mz48ddi99fzisd")))) + "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk")))) (build-system python-build-system) (propagated-inputs ; the following packages are all needed at run time `(("python-cycler" ,python-cycler) -- cgit 1.4.1