guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: gnu: Add python-xmlsec.


From: guix-commits
Subject: 02/05: gnu: Add python-xmlsec.
Date: Mon, 13 Jan 2025 05:19:07 -0500 (EST)

rekado pushed a commit to branch python-team
in repository guix.

commit 8a05cccf0af0cf6bd00cc70e41fb9492b5dad4cc
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon Jan 13 11:13:35 2025 +0100

    gnu: Add python-xmlsec.
    
    * gnu/packages/python-xyz.scm (python-xmlsec): New variable.
    
    Change-Id: Ieee901d7c12cb143d21a6fccd16d08fe7ce84ff1
---
 gnu/packages/python-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 62856dd669..912d5895f5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -185,6 +185,7 @@
   #:use-module (gnu packages astronomy)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
@@ -587,6 +588,48 @@ edit distance algorithm for Python in Cython for high 
performance.")
 similar XML files, in the same way the @command{diff} utility does it.")
     (license license:expat)))
 
+(define-public python-xmlsec
+  (package
+    (name "python-xmlsec")
+    (version "1.3.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "xmlsec" version))
+       (sha256
+        (base32 "1nd2jbrfbmnd566i1v39xrh3a0b1nqvf5bhydywcsnw95x7q0kwk"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; See https://github.com/xmlsec/python-xmlsec/issues/210
+      #:test-flags '(list "-n" "1"
+                          ;; This causes other tests to segfault.
+                          "-k" "not test_reinitialize_module")
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; FIXME: This is very unfortunate.  I can't seem to find a way to
+          ;; hardcode the location of this library, so users will also need to
+          ;; set LD_LIBRARY_PATH.
+          (add-before 'check 'pre-check
+            (lambda* (#:key inputs #:allow-other-keys)
+              (setenv "LD_LIBRARY_PATH"
+                      (dirname (search-input-file inputs 
"lib/libxmlsec1-openssl.so.1.2.37"))))))))
+    (inputs (list openssl libltdl libxslt libxml2))
+    (propagated-inputs (list python-lxml xmlsec-openssl))
+    (native-inputs (list pkg-config
+                         python-lxml
+                         python-pkgconfig
+                         python-pytest
+                         python-pytest-xdist
+                         python-setuptools
+                         python-setuptools-scm
+                         python-wheel))
+    (home-page "https://github.com/mehcode/python-xmlsec";)
+    (synopsis "Python bindings for the XML Security Library")
+    (description "This package provides Python bindings for the XML Security
+Library.")
+    (license license:expat)))
+
 (define-public python-janus
   (package
     (name "python-janus")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]