diff mbox series

[bug#62389,v3,1/5] gnu: Add python-matrix-common.

Message ID 3e9dc1f25960f69a4fc58a484f5c52c1ffe28e06.1707681098.git.mail@migalmoreno.com
State New
Headers show
Series [bug#62389,v3,1/5] gnu: Add python-matrix-common. | expand

Commit Message

Miguel Ángel Moreno Feb. 11, 2024, 7:52 p.m. UTC
* gnu/packages/python-xyz.scm (python-matrix-common): New variable.

Change-Id: I16f03bef7c4cc6c11d3eb33b33b517bbf0441c36
---
 gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)


base-commit: 6f78803b01d416ab421ba860751b764b9e4f33db
-- 
2.41.0



-- 
Best regards,
Miguel Ángel Moreno
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c68b17b0ab..8aaf2d63d3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8902,6 +8902,47 @@  (define-public python-perfplot
 the results.")
     (license license:gpl3+)))
 
+(define-public python-matrix-common
+  (package
+    (name"python-matrix-common")
+    (version "1.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "matrix_common" version))
+              (sha256
+               (base32
+                "0lrqzb6s57fxp0kwffdqnkr2pj9aia459cv1b95b55dxlq1cz7d9"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda _
+              (setenv "SOURCE_DATE_EPOCH"
+                      (number->string (* 10 366 24 60 60)))
+              (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "pytest" "-vv" "tests")))))))
+    (native-inputs
+     (list
+      python-pypa-build
+      python-pytest
+      python-setuptools-scm
+      python-wheel))
+    (home-page "https://github.com/matrix-org/matrix-python-common")
+    (synopsis "Common code for Synapse, Sydent and Sygnal")
+    (description "This package provides common utilities for Synapse, Sydent
+and Sygnal.")
+    (license license:asl2.0)))
+
 (define-public python-pysnptools
   (package
     (name "python-pysnptools")