From 7ff3f3d22caaf03948a60ae691313db28f4fab06 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Nov 2018 01:47:36 +0100 Subject: gnu: python-scikit-learn: Update to 0.20.1. * gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/machine-learning.scm (python-scikit-learn): Update to 0.20.1. [source](patches): Remove. [arguments]: Skip network tests with pytest instead of deleting files. Make sure $HOME is writable. (python2-scikit-learn): Rewrite in terms of PACKAGE-WITH-PYTHON2. --- gnu/packages/machine-learning.scm | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 09c525ff20..4b2447ece0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -706,7 +706,7 @@ computing environments.") (define-public python-scikit-learn (package (name "python-scikit-learn") - (version "0.19.2") + (version "0.20.1") (source (origin (method git-fetch) @@ -716,9 +716,7 @@ computing environments.") (file-name (git-file-name name version)) (sha256 (base32 - "1dk9hdj01c0bny4ps78b7869fjw9gr6qklxf6wyql8h6nh4k19xm")) - (patches (search-patches - "python-scikit-learn-fix-test-non-determinism.patch")))) + "0qv7ir1fy9vjar3llc72yxmfja3gxm5icdf0y3q57vsn3wcdglkz")))) (build-system python-build-system) (arguments `(#:phases @@ -729,11 +727,11 @@ computing environments.") (lambda _ ;; Restrict OpenBLAS threads to prevent segfaults while testing! (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t)) + + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") + + (invoke "pytest" "sklearn" "-m" "not network"))) ;; FIXME: This fails with permission denied (delete 'reset-gzip-timestamps)))) (inputs @@ -753,24 +751,7 @@ data analysis.") (license license:bsd-3))) (define-public python2-scikit-learn - (let ((parent (package-with-python2 python-scikit-learn))) - (package (inherit parent) - (arguments - (substitute-keyword-arguments (package-arguments parent) - ((#:phases phases) - `(modify-phases ,phases - (replace 'check - (lambda _ - ;; Restrict OpenBLAS threads to prevent segfaults while testing! - (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Some tests expect to be able to write to HOME. - (setenv "HOME" "/tmp") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_kddcup99.py") - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t))))))))) + (package-with-python2 python-scikit-learn)) (define-public python-autograd (let* ((commit "442205dfefe407beffb33550846434baa90c4de7") -- cgit v1.2.3 From 1e92d311c3e43827a76f5bc9a43def7f7690f8c1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 25 Nov 2018 20:36:44 +0100 Subject: gnu: randomjungle: Do not build static binaries. * gnu/packages/patches/randomjungle-disable-static-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/machine-learning.scm (randomjungle)[source](patches): Add it. [arguments]: Add "--disable-static" to #:configure-flags. --- gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 4 +++- .../patches/randomjungle-disable-static-build.patch | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/randomjungle-disable-static-build.patch (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 8b673fdd8a..5034727ac2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1115,6 +1115,7 @@ dist_patch_DATA = \ %D%/packages/patches/quilt-compat-getopt-fix-second-separator.patch \ %D%/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ + %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoison-shell.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4b2447ece0..7b9b28a2eb 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -333,13 +333,15 @@ algorithm.") (uri (string-append "http://www.imbs-luebeck.de/imbs/sites/default/files/u59/" "randomjungle-" version ".tar_.gz")) + (patches (search-patches "randomjungle-disable-static-build.patch")) (sha256 (base32 "12c8rf30cla71swx2mf4ww9mfd8jbdw5lnxd7dxhyw1ygrvg6y4w")))) (build-system gnu-build-system) (arguments `(#:configure-flags - (list (string-append "--with-boost=" + (list "--disable-static" + (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) #:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/randomjungle-disable-static-build.patch b/gnu/packages/patches/randomjungle-disable-static-build.patch new file mode 100644 index 0000000000..3de6c269fd --- /dev/null +++ b/gnu/packages/patches/randomjungle-disable-static-build.patch @@ -0,0 +1,14 @@ +Drop build time dependency on the static executables. + +--- a/src/Makefile.in 2018-11-25 20:27:10.691508925 +0100 ++++ b/src/Makefile.in 2018-11-25 20:27:43.565631413 +0100 +@@ -34,8 +34,7 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-bin_PROGRAMS = rjungle$(EXEEXT) rjungle_static$(EXEEXT) \ +- rjunglesparse$(EXEEXT) rjunglesparse_static$(EXEEXT) ++bin_PROGRAMS = rjungle$(EXEEXT) rjunglesparse$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -- cgit v1.2.3