From 6d85fc427740490b9b70ee5b039dcc3f2f9012a6 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Mon, 1 Dec 2025 21:26:25 +0000 Subject: [PATCH] gnu: python-olm: Switch to pyproject. * gnu/packages/crypto.scm (python-olm): [build-system]: Switch to pyproject-build-system. [arguments] : Use default 'check. [native-inputs]: Add python-setuptools. Change-Id: I5179965b0a5eb0e40e1926d36c1ac14dabacbe69 --- gnu/packages/crypto.scm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index e029ec46b0..5149cf7fce 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -79,6 +79,7 @@ #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) @@ -102,6 +103,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix utils) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26)) @@ -1393,12 +1395,14 @@ API.") (define-deprecated-package libolm olm) +;; TODO: This is the only Python package here, consider to build from source +;; directly without inheritance and move to python-crypto module. (define-public python-olm (package ;; python-olm is part of olm and must be updated at the same time. (inherit olm) (name "python-olm") - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases @@ -1408,17 +1412,15 @@ API.") (chdir "python"))) (add-before 'build 'set-preprocessor (lambda _ - (setenv "CPP" "gcc -E"))) - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest"))))))) + (setenv "CPP" "gcc -E")))))) (inputs (list olm)) (propagated-inputs (list python-cffi python-future)) (native-inputs - (list python-pytest python-pytest-benchmark python-aspectlib)) + (list python-aspectlib + python-pytest + python-pytest-benchmark + python-setuptools)) (synopsis "Python bindings for Olm") (description "The Olm library implements the Double Ratchet cryptographic ratchet. This package contains its Python bindings.")))