[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: gnu: python-tlsh: Fix build.
From: |
guix-commits |
Subject: |
05/06: gnu: python-tlsh: Fix build. |
Date: |
Mon, 24 Apr 2023 23:49:41 -0400 (EDT) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 971f00f237b5d5e40e1b1505dd4953f491575a6d
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Apr 24 21:31:56 2023 -0400
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.
---
gnu/packages/python-xyz.scm | 30 ++++++++++--------------------
1 file changed, 10 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b7718d6d6d..856fc9adb9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13490,32 +13490,22 @@ $ rm -rf /tmp/env
(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 _
+ (invoke "cmake" "."))) ;to generate tlsh_version.h
+ (add-after 'configure 'chdir
(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
+ (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.
- branch core-updates updated (92dd588b81 -> 7fc2c442c8), guix-commits, 2023/04/24
- 02/06: gnu: docker-compose: Use python-jsonschema-3 to fix build., guix-commits, 2023/04/24
- 01/06: gnu: Add python-jsonschema-3., guix-commits, 2023/04/24
- 03/06: gnu: python-pdbpp: Update to 0.10.3-0.e1c2e34., guix-commits, 2023/04/24
- 05/06: gnu: python-tlsh: Fix build.,
guix-commits <=
- 06/06: gnu: gnucash: Update help installation prefix., guix-commits, 2023/04/24
- 04/06: gnu: sicp: Fix build., guix-commits, 2023/04/24