all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] gnu: libxml2: Update to 2.9.2.
@ 2015-05-30  9:12 宋文武
  2015-05-30  9:12 ` [PATCH 2/2] gnu: libxml2: Build python bindings separately 宋文武
  2015-05-30 16:00 ` [PATCH 1/2] gnu: libxml2: Update to 2.9.2 Mark H Weaver
  0 siblings, 2 replies; 8+ messages in thread
From: 宋文武 @ 2015-05-30  9:12 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/xml.scm (libxml2): Update to 2.9.2.
---
 gnu/packages/xml.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 8a4d2fb..a4c81b2 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,14 +58,14 @@ things the parser might find in the XML document (like start tags).")
 (define-public libxml2
   (package
     (name "libxml2")
-    (version "2.9.0")
+    (version "2.9.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd"))))
+               "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i"))))
     (build-system gnu-build-system)
     (home-page "http://www.xmlsoft.org/")
     (synopsis "C parser for XML")
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] gnu: libxml2: Build python bindings separately.
  2015-05-30  9:12 [PATCH 1/2] gnu: libxml2: Update to 2.9.2 宋文武
@ 2015-05-30  9:12 ` 宋文武
  2015-05-30 16:07   ` Mark H Weaver
  2015-05-30 16:00 ` [PATCH 1/2] gnu: libxml2: Update to 2.9.2 Mark H Weaver
  1 sibling, 1 reply; 8+ messages in thread
From: 宋文武 @ 2015-05-30  9:12 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/xml.scm (libxml2)[native-inputs]: Remove python.
  [arguments]: Remove.
  (python-libxml2, python2-libxml): New variables.
---
 gnu/packages/xml.scm | 53 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index a4c81b2..22d4e52 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages linux))
 
 (define-public expat
@@ -70,10 +71,7 @@ things the parser might find in the XML document (like start tags).")
     (home-page "http://www.xmlsoft.org/")
     (synopsis "C parser for XML")
     (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
-    (native-inputs `(("perl" ,perl)
-                     ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
-
-
+    (native-inputs `(("perl" ,perl)))
     ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
     ;; sub-directory of any given package.
     (native-search-paths (list (search-path-specification
@@ -83,29 +81,40 @@ things the parser might find in the XML document (like start tags).")
                                 (file-pattern "^catalog\\.xml$")
                                 (file-type 'regular))))
     (search-paths native-search-paths)
-
-    (arguments
-     `(#:phases
-        (alist-replace
-         'install
-         (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-          (let ((install (assoc-ref %standard-phases 'install))
-                (glibc (assoc-ref inputs ,(if (%current-target-system)
-                                              "cross-libc" "libc")))
-                (out (assoc-ref outputs "out")))
-            (apply install args)
-            (chdir "python")
-            (substitute* "setup.py"
-              (("/opt/include")
-               (string-append glibc "/include")))
-            (system* "python" "setup.py" "install"
-                     (string-append "--prefix=" out))))
-        %standard-phases)))
     (description
      "Libxml2 is the XML C parser and toolkit developed for the Gnome project
 (but it is usable outside of the Gnome platform).")
     (license license:x11)))
 
+(define-public python-libxml2
+  (package (inherit libxml2)
+    (name "python-libxml2")
+    (build-system python-build-system)
+    (arguments
+     `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'build 'configure
+          (lambda* (#:key inputs #:allow-other-keys)
+            (chdir "python")
+            (let ((glibc   (assoc-ref inputs ,(if (%current-target-system)
+                                                  "cross-libc" "libc")))
+                  (libxml2 (assoc-ref inputs "libxml2")))
+              (substitute* "setup.py"
+                ;; For 'libxml2/libxml/tree.h'.
+                (("ROOT = r'/usr'")
+                 (format #f "ROOT = r'~a'" libxml2))
+                ;; For 'iconv.h'.
+                (("/opt/include")
+                 (string-append glibc "/include")))))))))
+    (inputs `(("libxml2" ,libxml2)))
+    (synopsis "Python bindings for the libxml2 library")))
+
+(define-public python2-libxml
+  (package-with-python2 python-libxml2))
+
 (define-public libxslt
   (package
     (name "libxslt")
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: libxml2: Update to 2.9.2.
  2015-05-30  9:12 [PATCH 1/2] gnu: libxml2: Update to 2.9.2 宋文武
  2015-05-30  9:12 ` [PATCH 2/2] gnu: libxml2: Build python bindings separately 宋文武
@ 2015-05-30 16:00 ` Mark H Weaver
  2015-05-31  2:20   ` 宋文武
  1 sibling, 1 reply; 8+ messages in thread
From: Mark H Weaver @ 2015-05-30 16:00 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:
> * gnu/packages/xml.scm (libxml2): Update to 2.9.2.

Looks good, but this is probably for core-updates, since it will entail
recompiling at least 1/3 of our packages (as estimated by 'guix refresh
-l'), and possibly much more since gtk+ depends on libxml2 and is an
implicit input to packages using the glib-or-gtk-build-system, and 'guix
refresh -l' isn't aware of those dependencies.

Is it important that this update happen before the next core-updates
cycle?  If so, perhaps we could build it in another branch.

What do you think?

      Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: libxml2: Build python bindings separately.
  2015-05-30  9:12 ` [PATCH 2/2] gnu: libxml2: Build python bindings separately 宋文武
@ 2015-05-30 16:07   ` Mark H Weaver
  2015-05-31  2:29     ` 宋文武
  0 siblings, 1 reply; 8+ messages in thread
From: Mark H Weaver @ 2015-05-30 16:07 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:

> * gnu/packages/xml.scm (libxml2)[native-inputs]: Remove python.
>   [arguments]: Remove.
>   (python-libxml2, python2-libxml): New variables.
> ---
>  gnu/packages/xml.scm | 53 ++++++++++++++++++++++++++++++----------------------
>  1 file changed, 31 insertions(+), 22 deletions(-)
>
> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
> index a4c81b2..22d4e52 100644
> --- a/gnu/packages/xml.scm
> +++ b/gnu/packages/xml.scm

[...]

> +(define-public python2-libxml
> +  (package-with-python2 python-libxml2))
> +

Due to non-obvious complications arising from the fact that xml.scm and
python.scm are mutually dependent on each other, we can't use
'package-with-python2' from xml.scm.  For now, I suggest moving it to
python.scm, where all other uses of 'package-with-python2' are currently
located.

For an explanation, see:

https://lists.gnu.org/archive/html/guix-devel/2014-12/msg00355.html

     Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: libxml2: Update to 2.9.2.
  2015-05-30 16:00 ` [PATCH 1/2] gnu: libxml2: Update to 2.9.2 Mark H Weaver
@ 2015-05-31  2:20   ` 宋文武
  0 siblings, 0 replies; 8+ messages in thread
From: 宋文武 @ 2015-05-31  2:20 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> 宋文武 <iyzsong@gmail.com> writes:
>> * gnu/packages/xml.scm (libxml2): Update to 2.9.2.
>
> Looks good, but this is probably for core-updates, since it will entail
> recompiling at least 1/3 of our packages (as estimated by 'guix refresh
> -l'), and possibly much more since gtk+ depends on libxml2 and is an
> implicit input to packages using the glib-or-gtk-build-system, and 'guix
> refresh -l' isn't aware of those dependencies.
Yes, I agree.
>
> Is it important that this update happen before the next core-updates
> cycle?  If so, perhaps we could build it in another branch.
Not important, ok for 'core-updates'.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: libxml2: Build python bindings separately.
  2015-05-30 16:07   ` Mark H Weaver
@ 2015-05-31  2:29     ` 宋文武
  2015-05-31 16:57       ` Mark H Weaver
  0 siblings, 1 reply; 8+ messages in thread
From: 宋文武 @ 2015-05-31  2:29 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> 宋文武 <iyzsong@gmail.com> writes:
>
>> * gnu/packages/xml.scm (libxml2)[native-inputs]: Remove python.
>>   [arguments]: Remove.
>>   (python-libxml2, python2-libxml): New variables.
>> ---
>>  gnu/packages/xml.scm | 53 ++++++++++++++++++++++++++++++----------------------
>>  1 file changed, 31 insertions(+), 22 deletions(-)
>>
>> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
>> index a4c81b2..22d4e52 100644
>> --- a/gnu/packages/xml.scm
>> +++ b/gnu/packages/xml.scm
>
> [...]
>
>> +(define-public python2-libxml
>> +  (package-with-python2 python-libxml2))
>> +
>
> Due to non-obvious complications arising from the fact that xml.scm and
> python.scm are mutually dependent on each other, we can't use
> 'package-with-python2' from xml.scm.  For now, I suggest moving it to
> python.scm, where all other uses of 'package-with-python2' are currently
> located.
>
> For an explanation, see:
>
> https://lists.gnu.org/archive/html/guix-devel/2014-12/msg00355.html
Thanks for explainging, but when I put it into python.scm,
I got "Unbound variable: libxml2" when running:
  $ ./pre-inst-env guix package -i python2-libxml
or:
  $ make
but not:
  $ ./pre-inst-env guix build python2-libxml

Any ideas? Thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: libxml2: Build python bindings separately.
  2015-05-31  2:29     ` 宋文武
@ 2015-05-31 16:57       ` Mark H Weaver
  2015-06-01  1:01         ` 宋文武
  0 siblings, 1 reply; 8+ messages in thread
From: Mark H Weaver @ 2015-05-31 16:57 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:

> Mark H Weaver <mhw@netris.org> writes:
>
>> 宋文武 <iyzsong@gmail.com> writes:
>>
>>> * gnu/packages/xml.scm (libxml2)[native-inputs]: Remove python.
>>>   [arguments]: Remove.
>>>   (python-libxml2, python2-libxml): New variables.
>>> ---
>>>  gnu/packages/xml.scm | 53 ++++++++++++++++++++++++++++++----------------------
>>>  1 file changed, 31 insertions(+), 22 deletions(-)
>>>
>>> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
>>> index a4c81b2..22d4e52 100644
>>> --- a/gnu/packages/xml.scm
>>> +++ b/gnu/packages/xml.scm
>>
>> [...]
>>
>>> +(define-public python2-libxml
>>> +  (package-with-python2 python-libxml2))
>>> +
>>
>> Due to non-obvious complications arising from the fact that xml.scm and
>> python.scm are mutually dependent on each other, we can't use
>> 'package-with-python2' from xml.scm.  For now, I suggest moving it to
>> python.scm, where all other uses of 'package-with-python2' are currently
>> located.
>>
>> For an explanation, see:
>>
>> https://lists.gnu.org/archive/html/guix-devel/2014-12/msg00355.html
> Thanks for explainging, but when I put it into python.scm,
> I got "Unbound variable: libxml2" when running:
>   $ ./pre-inst-env guix package -i python2-libxml
> or:
>   $ make
> but not:
>   $ ./pre-inst-env guix build python2-libxml
>
> Any ideas? Thanks!

It turns out that 'package-with-python2' is no longer exported from
(gnu packages python), but rather from (guix build-system python) which
is not part of any cycles, so it is now okay to use 'package-with-python2'
from other modules.

In fact, because of the (inherit libxml2) in 'python-libxml2', these
packages should be in xml.scm, right where you had put them -- or at
least not in any other module that shares a cycle with xml.scm -- so
please disregard my suggestion that they should be moved.

However, I just noticed one minor mispelling: the variable should be
named 'python2-libxml2', not 'python2-libxml'.

    Thanks!
      Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: libxml2: Build python bindings separately.
  2015-05-31 16:57       ` Mark H Weaver
@ 2015-06-01  1:01         ` 宋文武
  0 siblings, 0 replies; 8+ messages in thread
From: 宋文武 @ 2015-06-01  1:01 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> 宋文武 <iyzsong@gmail.com> writes:
>
>> Mark H Weaver <mhw@netris.org> writes:
>>
>>> 宋文武 <iyzsong@gmail.com> writes:
>>>
>>>> * gnu/packages/xml.scm (libxml2)[native-inputs]: Remove python.
>>>>   [arguments]: Remove.
>>>>   (python-libxml2, python2-libxml): New variables.
>>>> ---
>>>>  gnu/packages/xml.scm | 53 ++++++++++++++++++++++++++++++----------------------
>>>>  1 file changed, 31 insertions(+), 22 deletions(-)
>>>>
>>>> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
>>>> index a4c81b2..22d4e52 100644
>>>> --- a/gnu/packages/xml.scm
>>>> +++ b/gnu/packages/xml.scm
>>>
>>> [...]
>>>
>>>> +(define-public python2-libxml
>>>> +  (package-with-python2 python-libxml2))
>>>> +
>>>
>>> Due to non-obvious complications arising from the fact that xml.scm and
>>> python.scm are mutually dependent on each other, we can't use
>>> 'package-with-python2' from xml.scm.  For now, I suggest moving it to
>>> python.scm, where all other uses of 'package-with-python2' are currently
>>> located.
>>>
>>> For an explanation, see:
>>>
>>> https://lists.gnu.org/archive/html/guix-devel/2014-12/msg00355.html
>> Thanks for explainging, but when I put it into python.scm,
>> I got "Unbound variable: libxml2" when running:
>>   $ ./pre-inst-env guix package -i python2-libxml
>> or:
>>   $ make
>> but not:
>>   $ ./pre-inst-env guix build python2-libxml
>>
>> Any ideas? Thanks!
>
> It turns out that 'package-with-python2' is no longer exported from
> (gnu packages python), but rather from (guix build-system python) which
> is not part of any cycles, so it is now okay to use 'package-with-python2'
> from other modules.
OK, got it.
>
> In fact, because of the (inherit libxml2) in 'python-libxml2', these
> packages should be in xml.scm, right where you had put them -- or at
> least not in any other module that shares a cycle with xml.scm -- so
> please disregard my suggestion that they should be moved.
>
> However, I just noticed one minor mispelling: the variable should be
> named 'python2-libxml2', not 'python2-libxml'.
Yes, that's right.

Pushed it into 'core-updates', thanks for review!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-06-01  1:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-30  9:12 [PATCH 1/2] gnu: libxml2: Update to 2.9.2 宋文武
2015-05-30  9:12 ` [PATCH 2/2] gnu: libxml2: Build python bindings separately 宋文武
2015-05-30 16:07   ` Mark H Weaver
2015-05-31  2:29     ` 宋文武
2015-05-31 16:57       ` Mark H Weaver
2015-06-01  1:01         ` 宋文武
2015-05-30 16:00 ` [PATCH 1/2] gnu: libxml2: Update to 2.9.2 Mark H Weaver
2015-05-31  2:20   ` 宋文武

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.