diff options
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 837ebbba67..3918d32d2f 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net> ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com> ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net> -;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -217,20 +217,7 @@ classification.") #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-dir - (lambda _ (chdir "ghmm") #t)) - (delete 'check) - (add-after 'install 'check - (assoc-ref %standard-phases 'check)) - (add-before 'check 'fix-PYTHONPATH - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((python-version (python-version - (assoc-ref inputs "python")))) - (setenv "PYTHONPATH" - (string-append (getenv "PYTHONPATH") - ":" (assoc-ref outputs "out") - "/lib/python" python-version - "/site-packages"))) - #t)) + (lambda _ (chdir "ghmm"))) (add-after 'enter-dir 'fix-runpath (lambda* (#:key outputs #:allow-other-keys) (substitute* "ghmmwrapper/setup.py" @@ -241,8 +228,7 @@ classification.") line "\"-Wl,-rpath=" (assoc-ref outputs "out") - "/lib\", "))) - #t)) + "/lib\", "))))) (add-after 'enter-dir 'disable-broken-tests (lambda _ (substitute* "tests/Makefile.am" @@ -262,8 +248,7 @@ classification.") line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" - line))) - #t))))) + line)))))))) (inputs `(("python" ,python-2) ; only Python 2 is supported ("libxml2" ,libxml2))) @@ -1428,7 +1413,7 @@ automatically.") (let* ((server (string-append bin "/kaldi-gst-server")) (client (string-append bin "/kaldi-gst-client")) (worker (string-append bin "/kaldi-gst-worker")) - (PYTHONPATH (getenv "PYTHONPATH")) + (PYTHONPATH (getenv "GUIX_PYTHONPATH")) (GST_PLUGIN_PATH (string-append (assoc-ref inputs "gst-kaldi-nnet2-online") "/lib/gstreamer-1.0:${GST_PLUGIN_PATH}")) @@ -1437,7 +1422,7 @@ automatically.") (lambda _ (format #t "#!~a -export PYTHONPATH=~a +export GUIX_PYTHONPATH=~a export GST_PLUGIN_PATH=~a exec ~a ~a/~a \"$@\"~%" (which "bash") PYTHONPATH GST_PLUGIN_PATH @@ -1561,10 +1546,9 @@ Python.") ;; https://github.com/tensorflow/tensorflow/issues/34197 (substitute* (find-files "tensorflow/python" ".*\\.cc$") (("(nullptr,)(\\ +/. tp_print)" _ _ tp_print) - (string-append "NULL, " tp_print))) - #t)) + (string-append "NULL, " tp_print))))) (add-after 'python3.7-compatibility 'chdir - (lambda _ (chdir "tensorflow/contrib/cmake") #t)) + (lambda _ (chdir "tensorflow/contrib/cmake"))) (add-after 'chdir 'disable-downloads (lambda* (#:key inputs #:allow-other-keys) (substitute* (find-files "external" "\\.cmake$") @@ -1701,8 +1685,7 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive " "re2")) (rename-file "../build/cub/src/cub/cub-1.8.0/" - "../build/cub/src/cub/cub/") - #t)) + "../build/cub/src/cub/cub/"))) (add-after 'unpack 'fix-python-build (lambda* (#:key inputs outputs #:allow-other-keys) (mkdir-p "protobuf-src") @@ -1713,9 +1696,6 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive " "-C" "eigen-src" "--strip-components=1") (substitute* "tensorflow/contrib/cmake/tf_python.cmake" - ;; Ensure that all Python dependencies can be found at build time. - (("PYTHONPATH=\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/tf_python" m) - (string-append m ":" (getenv "PYTHONPATH"))) ;; Take protobuf source files from our source package. (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/protobuf/src/protobuf/src/google") (string-append (getcwd) "/protobuf-src/src/google"))) @@ -1741,15 +1721,13 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive " (string-append "set_target_properties(${_AT_TARGET} PROPERTIES \ COMPILE_FLAGS ${target_compile_flags} \ INSTALL_RPATH_USE_LINK_PATH TRUE \ -INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n"))) - #t)) +INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n"))))) (add-after 'build 'build-pip-package (lambda* (#:key outputs #:allow-other-keys) (setenv "LDFLAGS" (string-append "-Wl,-rpath=" (assoc-ref outputs "out") "/lib")) - (invoke "make" "tf_python_build_pip_package") - #t)) + (invoke "make" "tf_python_build_pip_package"))) (add-after 'build-pip-package 'install-python (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) @@ -1764,8 +1742,7 @@ INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n"))) (string-append out "/lib/python" python-version "/site-packages/tensorflow/contrib/" - "seq2seq/python/ops/lib_beam_search_ops.so")) - #t)))))) + "seq2seq/python/ops/lib_beam_search_ops.so")))))))) (native-inputs `(("pkg-config" ,pkg-config) ("protobuf:native" ,protobuf-3.6) ; protoc |