mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-21 01:26:43 +01:00
gnu: python-tlsh: Fix build.
* gnu/packages/python-xyz.scm (python-tlsh) [build-system]: Switch to python-build-system. [arguments]: Remove #:out-of-source. Remove install phase override. Add a configure, chdir and adjust the check phase override. [inputs]: Delete field. [native-inputs]: New field.
This commit is contained in:
parent
c9f82d57eb
commit
971f00f237
1 changed files with 10 additions and 20 deletions
|
@ -13490,32 +13490,22 @@ (define-public python-tlsh
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "1gb5j73nw3nmx030rf8pm75rns5syxhv44zxr6i74kjicyly1i9w"))))
|
||||
(build-system cmake-build-system)
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
(list #:out-of-source? #f
|
||||
#:phases
|
||||
(list #:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'install
|
||||
(add-before 'build 'configure
|
||||
(lambda _
|
||||
;; Build and install the Python bindings. The underlying
|
||||
;; C++ library is apparently not meant to be installed.
|
||||
(with-directory-excursion "py_ext"
|
||||
(and (system* "python" "setup.py" "build")
|
||||
(system* "python" "setup.py" "install"
|
||||
(string-append "--prefix=" #$output))))))
|
||||
;; Delay tests until the phase above has run.
|
||||
(delete 'check)
|
||||
(add-after 'install 'check
|
||||
(invoke "cmake" "."))) ;to generate tlsh_version.h
|
||||
(add-after 'configure 'chdir
|
||||
(lambda _
|
||||
(chdir "py_ext")))
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(substitute* "Testing/python_test.sh"
|
||||
;; The script sets up a working PYTHONPATH, but does not
|
||||
;; export it for all subsequent test commands. Fix that.
|
||||
(("^PYTHONPATH=\".*" all)
|
||||
(string-append all "\nexport PYTHONPATH\n")))
|
||||
(when tests?
|
||||
(with-directory-excursion "Testing"
|
||||
(with-directory-excursion "../Testing"
|
||||
(invoke "./python_test.sh"))))))))
|
||||
(inputs (list python-wrapper)) ;for the bindings
|
||||
(native-inputs (list cmake-minimal))
|
||||
(synopsis "Fuzzy matching library for Python")
|
||||
(description
|
||||
"Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
|
||||
|
|
Loading…
Reference in a new issue