guix-patches
[Top][All Lists]
Advanced

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

[bug#64012] [PATCH v4 2/3] Ignu: python-libxml2: Add version 2.11.4


From: Andy Tai
Subject: [bug#64012] [PATCH v4 2/3] Ignu: python-libxml2: Add version 2.11.4
Date: Tue, 13 Jun 2023 23:04:10 -0700

* gnu/packages/xml.scm (python-libxml2-next): Version 2.11.4 as new variable
---
 gnu/packages/xml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index eaaa93fe14..74976f7402 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -300,6 +300,48 @@ (define-public python-libxml2
     (inputs (list libxml2))
     (synopsis "Python bindings for the libxml2 library")))
 
+(define-public python-libxml2-next
+  (package/inherit python-libxml2
+    (version "2.11.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.gnome.org/sources/libxml2/";
+                    (version-major+minor version) "/libxml2-" version
+                    ".tar.xz"))
+              (sha256 (base32
+                       
"1xspgyswllk26g7jg95pnkfk1gqpzna28fm1kir3kwdki9ziszkk"))))
+
+    (native-inputs (list pkg-config
+                         autoconf-wrapper
+                         automake
+                         libtool
+                         perl
+                         python-minimal-wrapper))
+    ;; needed to generate setup.py
+    
+    (arguments (list
+                ;; XXX: Tests are specified in 'Makefile.am', but not in 
'setup.py'.
+                #:tests? #f
+                #:phases #~(modify-phases %standard-phases
+                             (add-after 'unpack 'set-env
+                               (lambda _
+                                 (setenv "CONFIG_SHELL"
+                                         (which "sh")) #t))
+                             (add-before 'build 'configure
+                               (lambda* (#:key inputs #:allow-other-keys)
+                                 (invoke "sh" "autogen.sh")
+                                 (chdir "python")
+                                 (let ((libxml2-headers (search-input-directory
+                                                         inputs
+                                                         "include/libxml2")))
+                                   (substitute* "setup.py"
+                                     ;; The build system ignores 
C_INCLUDE_PATH & co, so
+                                     ;; provide the absolute directory name.
+                                     (("/opt/include")
+                                      (dirname libxml2-headers)))))))))
+    (inputs (list libxml2-next))))
+
 (define-public libxlsxwriter
   (package
     (name "libxlsxwriter")
-- 
2.40.1






reply via email to

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