gnu: liblantern: Update to 0.13.0.
* gnu/packages/machine-learning.scm (liblantern): Update to 0.13.0. Change-Id: I7725adf59e4506b2b5b301ca2f57c4f07e16f594master
parent
eba71dafb3
commit
5e48571f8c
|
@ -5327,74 +5327,70 @@ of Hidden Markov Models.")
|
||||||
|
|
||||||
;; Keep this in sync with the r-torch package.
|
;; Keep this in sync with the r-torch package.
|
||||||
(define-public liblantern
|
(define-public liblantern
|
||||||
;; There has been no release or tagged commit for r-torch 0.12.0. The
|
(package
|
||||||
;; selected commit corresponds to the 0.12.0 release.
|
(name "liblantern")
|
||||||
(let ((commit "4d83bd087be581f7db321c27f55897ff021d2537")
|
(version "0.13.0")
|
||||||
(revision "1"))
|
(source
|
||||||
(package
|
(origin
|
||||||
(name "liblantern")
|
(method git-fetch)
|
||||||
(version (git-version "0.11.0" revision commit))
|
(uri (git-reference
|
||||||
(source
|
(url "https://github.com/mlverse/torch")
|
||||||
(origin
|
(commit (string-append "v" version))))
|
||||||
(method git-fetch)
|
(file-name (git-file-name name version))
|
||||||
(uri (git-reference
|
(sha256
|
||||||
(url "https://github.com/mlverse/torch")
|
(base32 "1yy5xpn9mi5qm7k4w7040d6frpixm9ifs46v1cn9b6bpc1qs1a02"))))
|
||||||
(commit commit)))
|
(build-system cmake-build-system)
|
||||||
(file-name (git-file-name name version))
|
(arguments
|
||||||
(sha256
|
(list
|
||||||
(base32 "1xxc6vr7sr2mg0va0hc2fs4f6v5b78mx43dp2shzzbcgw90mgpvk"))))
|
#:tests? #false ;no test target
|
||||||
(build-system cmake-build-system)
|
#:phases
|
||||||
(arguments
|
(let ((python-version (version-major+minor (package-version python))))
|
||||||
(list
|
#~(modify-phases %standard-phases
|
||||||
#:tests? #false ;no test target
|
(add-after 'unpack 'chdir
|
||||||
#:phases
|
(lambda _ (chdir "src/lantern")))
|
||||||
(let ((python-version (version-major+minor (package-version python))))
|
(add-after 'chdir 'do-not-download-binaries
|
||||||
#~(modify-phases %standard-phases
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(add-after 'unpack 'chdir
|
(substitute* "CMakeLists.txt"
|
||||||
(lambda _ (chdir "src/lantern")))
|
(("find_package\\(Torch.*") "set(TORCH_CXX_FLAGS \"-ltorch\")\n")
|
||||||
(add-after 'chdir 'do-not-download-binaries
|
(("retrieve_lib\\(.*") ""))
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(let ((site-packages (string-append "/lib/python"
|
||||||
(substitute* "CMakeLists.txt"
|
#$python-version
|
||||||
(("find_package\\(Torch.*") "set(TORCH_CXX_FLAGS \"-ltorch\")\n")
|
"/site-packages")))
|
||||||
(("retrieve_lib\\(.*") ""))
|
(setenv "LIBRARY_PATH"
|
||||||
(let ((site-packages (string-append "/lib/python"
|
(string-append
|
||||||
#$python-version
|
(search-input-directory
|
||||||
"/site-packages")))
|
inputs (string-append site-packages "/torch/lib"))
|
||||||
(setenv "LIBRARY_PATH"
|
":" (or (getenv "LIBRARY_PATH") "")))
|
||||||
(string-append
|
(setenv "CPLUS_INCLUDE_PATH"
|
||||||
(search-input-directory
|
(string-append
|
||||||
inputs (string-append site-packages "/torch/lib"))
|
(search-input-directory
|
||||||
":" (or (getenv "LIBRARY_PATH") "")))
|
inputs (string-append
|
||||||
(setenv "CPLUS_INCLUDE_PATH"
|
site-packages "/torch/include/torch/csrc/api/include/"))
|
||||||
(string-append
|
":"
|
||||||
(search-input-directory
|
(search-input-directory
|
||||||
inputs (string-append
|
inputs (string-append site-packages "/torch/include/"))
|
||||||
site-packages "/torch/include/torch/csrc/api/include/"))
|
":"
|
||||||
":"
|
(or (getenv "CPLUS_INCLUDE_PATH") "")))
|
||||||
(search-input-directory
|
(setenv "C_INCLUDE_PATH"
|
||||||
inputs (string-append site-packages "/torch/include/"))
|
(string-append
|
||||||
":"
|
(search-input-directory
|
||||||
(or (getenv "CPLUS_INCLUDE_PATH") "")))
|
inputs (string-append site-packages "/torch/include/"))
|
||||||
(setenv "C_INCLUDE_PATH"
|
":"
|
||||||
(string-append
|
(or (getenv "C_INCLUDE_PATH") ""))))))
|
||||||
(search-input-directory
|
(replace 'install
|
||||||
inputs (string-append site-packages "/torch/include/"))
|
(lambda _
|
||||||
":"
|
(install-file
|
||||||
(or (getenv "C_INCLUDE_PATH") ""))))))
|
"../build/liblantern.so"
|
||||||
(replace 'install
|
(string-append #$output "/lib"))
|
||||||
(lambda _
|
(copy-recursively
|
||||||
(install-file
|
"../lantern/include"
|
||||||
"../build/liblantern.so"
|
(string-append #$output "/include"))))))))
|
||||||
(string-append #$output "/lib"))
|
(inputs (list python-pytorch-for-r-torch))
|
||||||
(copy-recursively
|
(home-page "https://github.com/mlverse/torch/")
|
||||||
"../lantern/include"
|
(synopsis "C API to libtorch")
|
||||||
(string-append #$output "/include"))))))))
|
(description
|
||||||
(inputs (list python-pytorch-for-r-torch))
|
"Lantern provides a C API to the libtorch machine learning library.")
|
||||||
(home-page "https://github.com/mlverse/torch/")
|
(license license:expat)))
|
||||||
(synopsis "C API to libtorch")
|
|
||||||
(description
|
|
||||||
"Lantern provides a C API to the libtorch machine learning library.")
|
|
||||||
(license license:expat))))
|
|
||||||
|
|
||||||
(define-public python-lap
|
(define-public python-lap
|
||||||
(package
|
(package
|
||||||
|
|
Reference in New Issue