unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27077: [PATCH] gnu: python-xcffib: Update to 0.5.1.
@ 2017-05-25 21:55 José Miguel Sánchez García
  2017-05-25 22:40 ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: José Miguel Sánchez García @ 2017-05-25 21:55 UTC (permalink / raw)
  To: 27077

[-- Attachment #1: Type: text/plain, Size: 38 bytes --]



-- 
José Miguel Sánchez García

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-python-xcffib-Update-to-0.5.1.patch --]
[-- Type: text/x-diff; name=0001-gnu-python-xcffib-Update-to-0.5.1.patch, Size: 1382 bytes --]

From 611337e166025ed6afa61cab6c0f965ebfd93e56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 <jmi2k@openmailbox.org>
Date: Fri, 26 May 2017 01:48:35 +0200
Subject: [PATCH] gnu: python-xcffib: Update to 0.5.1.

* gnu/packages/python.scm (python-xcffib): Update to 0.5.1.
---
 gnu/packages/python.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5b9519bbf..107f8bfdf 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4694,15 +4694,15 @@ a front-end for C compilers or analysis tools.")
 (define-public python-xcffib
   (package
     (name "python-xcffib")
-    (version "0.1.9")
+    (version "0.5.1")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/x/"
-                          "xcffib/xcffib-" version ".tar.gz"))
+      (uri (string-append "https://pypi.python.org/packages/48/e8/83dc668044f0393c5b7bea1afdf42bf25005ca067bb130db924f673261ad/xcffib-"
+                     version ".tar.gz"))
       (sha256
        (base32
-        "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
+        "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
     (build-system python-build-system)
     (inputs
      `(("libxcb" ,libxcb)))
-- 
2.13.0


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

* bug#27077: [PATCH] gnu: python-xcffib: Update to 0.5.1.
  2017-05-25 21:55 bug#27077: [PATCH] gnu: python-xcffib: Update to 0.5.1 José Miguel Sánchez García
@ 2017-05-25 22:40 ` Marius Bakke
  2017-05-26 14:54   ` José Miguel Sánchez García
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2017-05-25 22:40 UTC (permalink / raw)
  To: José Miguel Sánchez García, 27077

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]

José Miguel Sánchez García <jmi2k@openmailbox.org> writes:

> * gnu/packages/python.scm (python-xcffib): Update to 0.5.1.

Thanks for this!

[...]

> -      (uri (string-append "https://pypi.python.org/packages/source/x/"
> -                          "xcffib/xcffib-" version ".tar.gz"))
> +      (uri (string-append "https://pypi.python.org/packages/48/e8/83dc668044f0393c5b7bea1afdf42bf25005ca067bb130db924f673261ad/xcffib-"
> +                     version ".tar.gz"))

Can you change this to use 'pypi-uri' instead?

Also, with this patch, "./pre-inst-env guix build python-cairocffi"
fails to build with an error such as:

OSError: cannot load library 'libxcb.so.1': libxcb.so.1: cannot open shared object file: No such file or directory

Can you try to substitute the invocation of "libxcb.so.1" in
"xcffib/init.py" to use the full store path and see if that helps?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#27077: [PATCH] gnu: python-xcffib: Update to 0.5.1.
  2017-05-25 22:40 ` Marius Bakke
@ 2017-05-26 14:54   ` José Miguel Sánchez García
  2017-05-26 18:34     ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: José Miguel Sánchez García @ 2017-05-26 14:54 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27077

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]


> Also, with this patch, "./pre-inst-env guix build python-cairocffi"
> fails to build with an error such as:
> 
> OSError: cannot load library 'libxcb.so.1': libxcb.so.1: cannot open
> shared object file: No such file or directory
> 
> Can you try to substitute the invocation of "libxcb.so.1" in
> "xcffib/init.py" to use the full store path and see if that helps?
Ok, I fixed it in a separate patch. That was the reason test were
disabled so that fixed them too.

> Can you change this to use 'pypi-uri' instead?
Any reason why `guix import` doesn't do that by default? I just copied
the output from that command, so I believed it was the way it should
be done.

Anyway, here you have both patches. Please check the message of the
first one, as I'm not fully used to Guix conventions regarding this.
-- 
José Miguel Sánchez García

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-python-xcffib-Fix-libxcb.so.1-path.patch --]
[-- Type: text/x-diff; name=0001-gnu-python-xcffib-Fix-libxcb.so.1-path.patch, Size: 1685 bytes --]

From 914f55e0b7d537bdb308d7e40e5e7156e3c05355 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 <jmi2k@openmailbox.org>
Date: Fri, 26 May 2017 18:35:17 +0200
Subject: [PATCH] gnu: python-xcffib: Fix libxcb.so.1 path.

* gnu/packages/python.scm (python-xcffib): Fix libxcb.so.1 path and enable
tests.
---
 gnu/packages/python.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5b9519bbf..6e85ec529 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4710,9 +4710,7 @@ a front-end for C compilers or analysis tools.")
      `(("python-cffi" ,python-cffi) ; used at run time
        ("python-six" ,python-six)))
     (arguments
-     `(;; FIXME: Tests cannot load libxcb.so.1
-       #:tests? #f
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'install 'install-doc
            (lambda* (#:key outputs #:allow-other-keys)
@@ -4721,7 +4719,12 @@ a front-end for C compilers or analysis tools.")
                (mkdir-p doc)
                (copy-file "README.md"
                           (string-append doc "/README.md"))
-               #t))))))
+               #t)))
+         (add-after 'unpack 'fix-libxcb-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libxcb (assoc-ref inputs "libxcb")))
+               (substitute* '("xcffib/__init__.py")
+                 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))))))))
     (home-page "https://github.com/tych0/xcffib")
     (synopsis "XCB Python bindings")
     (description
-- 
2.13.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-gnu-python-xcffib-Update-to-0.5.1.patch --]
[-- Type: text/x-diff; name=0001-gnu-python-xcffib-Update-to-0.5.1.patch, Size: 1243 bytes --]

From 33358874be40b6da2333ae1fee5712e99fde62de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 <jmi2k@openmailbox.org>
Date: Fri, 26 May 2017 18:42:20 +0200
Subject: [PATCH] gnu: python-xcffib: Update to 0.5.1.

* gnu/packages/python.scm (python-xcffib): Update to 0.5.1.
---
 gnu/packages/python.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6e85ec529..1fe1f14a1 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4694,15 +4694,14 @@ a front-end for C compilers or analysis tools.")
 (define-public python-xcffib
   (package
     (name "python-xcffib")
-    (version "0.1.9")
+    (version "0.5.1")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/x/"
-                          "xcffib/xcffib-" version ".tar.gz"))
+      (uri (pypi-uri "xcffib" version))
       (sha256
        (base32
-        "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
+        "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
     (build-system python-build-system)
     (inputs
      `(("libxcb" ,libxcb)))
-- 
2.13.0


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

* bug#27077: [PATCH] gnu: python-xcffib: Update to 0.5.1.
  2017-05-26 14:54   ` José Miguel Sánchez García
@ 2017-05-26 18:34     ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2017-05-26 18:34 UTC (permalink / raw)
  To: José Miguel Sánchez García; +Cc: 27077-done

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

José Miguel Sánchez García <jmi2k@openmailbox.org> writes:

>> Also, with this patch, "./pre-inst-env guix build python-cairocffi"
>> fails to build with an error such as:
>> 
>> OSError: cannot load library 'libxcb.so.1': libxcb.so.1: cannot open
>> shared object file: No such file or directory
>> 
>> Can you try to substitute the invocation of "libxcb.so.1" in
>> "xcffib/init.py" to use the full store path and see if that helps?
> Ok, I fixed it in a separate patch. That was the reason test were
> disabled so that fixed them too.

It looks like it does not actually run any tests. The check phase ends
with:

Ran 0 tests in 0.000s                                      
OK                                                      
phase `check' succeeded after 1.4 seconds

Looking in the upstream CI configuration (".travis.yml"), it's going to
take some work. Maybe you can give it a go? "cabal" does not work well
with Guix at the moment, but I think just getting the "pycheck" make
target working would be a good start (just runs "nosetests -v -d").

Regardless, I've applied the patch for now since it fixes a real issue,
but left a FIXME and #:tests #f. Also added a #t after the substitute*
call since the return value is unspecified.

>> Can you change this to use 'pypi-uri' instead?
> Any reason why `guix import` doesn't do that by default? I just copied
> the output from that command, so I believed it was the way it should
> be done.

IIRC, 'pypi-uri' was added after the pypi importer was made.
Improvements welcome!

> Anyway, here you have both patches. Please check the message of the
> first one, as I'm not fully used to Guix conventions regarding this.

Great. I updated the commit messages of both patches to mention with
section of the code is changed as per our usual style ([source],
[arguments] etc). Pushed as 8347c12291ca2234dfdee87074e305793d71f787.

Closing this bug, but it would be great to get those tests running!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2017-05-26 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 21:55 bug#27077: [PATCH] gnu: python-xcffib: Update to 0.5.1 José Miguel Sánchez García
2017-05-25 22:40 ` Marius Bakke
2017-05-26 14:54   ` José Miguel Sánchez García
2017-05-26 18:34     ` Marius Bakke

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).