unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 2/4] gnu: Add xcffib
@ 2014-12-14 19:40 Federico Beffa
  2014-12-15 22:16 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Beffa @ 2014-12-14 19:40 UTC (permalink / raw)
  To: Guix-devel

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

Fede

[-- Attachment #2: 0002-gnu-Add-xcffib.patch --]
[-- Type: text/x-patch, Size: 2291 bytes --]

From f4187d31f95e3a65947d77bf267115906ed3816b Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Wed, 10 Dec 2014 20:36:58 +0100
Subject: [PATCH 2/4] gnu: Add xcffib

* gnu/packages/python.scm (python-xcffib, python2-xcffib): New variables.
---
 gnu/packages/python.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 67effe7..9b3d721 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -50,6 +50,7 @@
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages which)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages xorg)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -2541,3 +2542,44 @@ a front-end for C compilers or analysis tools.")
 
 (define-public python2-cffi
   (package-with-python2 python-cffi))
+
+(define-public python-xcffib
+  (package
+    (name "python-xcffib")
+    (version "0.1.9")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/x/"
+                          "xcffib/xcffib-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
+    (build-system python-build-system)
+    (inputs
+     `(("libxcb" ,libxcb)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-cffi" ,python-cffi)))
+    (arguments
+     `(#:phases 
+       (alist-cons-after
+        'install 'install-doc
+        (lambda* (#:key outputs #:allow-other-keys)
+          (let ((doc (string-append (assoc-ref outputs "out") "/share"
+                                    "/doc/" ,name "-" ,version)))
+            (mkdir-p doc)
+            (copy-file "README.md"
+                       (string-append doc "/README.md"))))
+        %standard-phases)))
+    (home-page "https://github.com/tych0/xcffib")
+    (synopsis "XCB Python binding")
+    (description
+     "A drop in replacement for xpyb, an XCB python binding.")
+    (license expat)))
+
+(define-public python2-xcffib
+  (package-with-python2 python-xcffib))
+
-- 
1.8.4


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

* Re: [PATCH 2/4] gnu: Add xcffib
  2014-12-14 19:40 [PATCH 2/4] gnu: Add xcffib Federico Beffa
@ 2014-12-15 22:16 ` Ludovic Courtès
  2014-12-16 17:17   ` Federico Beffa
  2014-12-17 16:57   ` Federico Beffa
  0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-12-15 22:16 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> From f4187d31f95e3a65947d77bf267115906ed3816b Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 10 Dec 2014 20:36:58 +0100
> Subject: [PATCH 2/4] gnu: Add xcffib
>
> * gnu/packages/python.scm (python-xcffib, python2-xcffib): New variables.

[...]

> +    (propagated-inputs
> +     `(("python-cffi" ,python-cffi)))

Please add a comment saying why this is propagated.

> +    (synopsis "XCB Python binding")

“bindings” (plural)

> +    (description
> +     "A drop in replacement for xpyb, an XCB python binding.")

“drop-in”, “Python”, “bindings”.

Could you expound the description a little bit?

The rest looks alright.

Thanks,
Ludo’.

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

* Re: [PATCH 2/4] gnu: Add xcffib
  2014-12-15 22:16 ` Ludovic Courtès
@ 2014-12-16 17:17   ` Federico Beffa
  2014-12-17  9:01     ` Ludovic Courtès
  2014-12-17 16:57   ` Federico Beffa
  1 sibling, 1 reply; 6+ messages in thread
From: Federico Beffa @ 2014-12-16 17:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

On Mon, Dec 15, 2014 at 11:16 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> +    (propagated-inputs
>> +     `(("python-cffi" ,python-cffi)))
>
> Please add a comment saying why this is propagated.

The reason is that I want the package to inherit the propagated inputs
from 'python-cffi' as the latter requires 'python-pycparser' at run
time. If I don't make python-cffi a propagated-input, but a normal
input, I need to copy the propagated-inputs from that package and
(re-) make them propagated-inputs of python-xcffib as well.

A similar reason applier to python-xcffib in python-cairocffi and to
pygobject + python-cairocffi + gobject-introspection + pathon-pycairo
in python-matplotlib.

Is that OK?

Regards,
Fede

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

* Re: [PATCH 2/4] gnu: Add xcffib
  2014-12-16 17:17   ` Federico Beffa
@ 2014-12-17  9:01     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-12-17  9:01 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> On Mon, Dec 15, 2014 at 11:16 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>>> +    (propagated-inputs
>>> +     `(("python-cffi" ,python-cffi)))
>>
>> Please add a comment saying why this is propagated.
>
> The reason is that I want the package to inherit the propagated inputs
> from 'python-cffi' as the latter requires 'python-pycparser' at run
> time. If I don't make python-cffi a propagated-input, but a normal
> input, I need to copy the propagated-inputs from that package and
> (re-) make them propagated-inputs of python-xcffib as well.

Oh, I see.  But that’s basically because xcffib does “import cffi” or
something like that, right?

In that case I would just add a comment saying that, unless you really
think it’s obvious (it wasn’t to me, initially.)

> A similar reason applier to python-xcffib in python-cairocffi and to
> pygobject + python-cairocffi + gobject-introspection + pathon-pycairo
> in python-matplotlib.
>
> Is that OK?

Yes.  Thanks for explaining!

Ludo’.

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

* Re: [PATCH 2/4] gnu: Add xcffib
  2014-12-15 22:16 ` Ludovic Courtès
  2014-12-16 17:17   ` Federico Beffa
@ 2014-12-17 16:57   ` Federico Beffa
  2014-12-17 20:28     ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Federico Beffa @ 2014-12-17 16:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

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

On Mon, Dec 15, 2014 at 11:16 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Federico Beffa <beffa@ieee.org> skribis:
>
>> From f4187d31f95e3a65947d77bf267115906ed3816b Mon Sep 17 00:00:00 2001
>> From: Federico Beffa <beffa@fbengineering.ch>
>> Date: Wed, 10 Dec 2014 20:36:58 +0100
>> Subject: [PATCH 2/4] gnu: Add xcffib
>>
>> * gnu/packages/python.scm (python-xcffib, python2-xcffib): New variables.
>
> [...]
>
>> +    (propagated-inputs
>> +     `(("python-cffi" ,python-cffi)))
>
> Please add a comment saying why this is propagated.
>
>> +    (synopsis "XCB Python binding")
>
> “bindings” (plural)
>
>> +    (description
>> +     "A drop in replacement for xpyb, an XCB python binding.")
>
> “drop-in”, “Python”, “bindings”.
>
> Could you expound the description a little bit?

Please find attached an updated patch. Regarding the description: I've
tried to expand it a little, but, to be honest, I do not know much
about this package. I copied the description from the web site. I only
packaged it because it is used by other packages I'm interested in :-)

Regards,
Fede

[-- Attachment #2: 0002-gnu-Add-xcffib.patch --]
[-- Type: text/x-patch, Size: 2378 bytes --]

From 2b7df0f474c1e57eb31a81693500b686d177f3a1 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Wed, 10 Dec 2014 20:36:58 +0100
Subject: [PATCH 2/4] gnu: Add xcffib

* gnu/packages/python.scm (python-xcffib, python2-xcffib): New variables.
---
 gnu/packages/python.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 67effe7..c2657f2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -50,6 +50,7 @@
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages which)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages xorg)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -2541,3 +2542,45 @@ a front-end for C compilers or analysis tools.")
 
 (define-public python2-cffi
   (package-with-python2 python-cffi))
+
+(define-public python-xcffib
+  (package
+    (name "python-xcffib")
+    (version "0.1.9")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/x/"
+                          "xcffib/xcffib-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
+    (build-system python-build-system)
+    (inputs
+     `(("libxcb" ,libxcb)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-cffi" ,python-cffi))) ; used at run time
+    (arguments
+     `(#:phases 
+       (alist-cons-after
+        'install 'install-doc
+        (lambda* (#:key outputs #:allow-other-keys)
+          (let ((doc (string-append (assoc-ref outputs "out") "/share"
+                                    "/doc/" ,name "-" ,version)))
+            (mkdir-p doc)
+            (copy-file "README.md"
+                       (string-append doc "/README.md"))))
+        %standard-phases)))
+    (home-page "https://github.com/tych0/xcffib")
+    (synopsis "XCB Python bindings")
+    (description
+     "Xcffib is a replacement for xpyb, an XCB Python bindings.  It adds
+support for Python 3 and PyPy.  It is based on cffi.")
+    (license expat)))
+
+(define-public python2-xcffib
+  (package-with-python2 python-xcffib))
+
-- 
1.8.4


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

* Re: [PATCH 2/4] gnu: Add xcffib
  2014-12-17 16:57   ` Federico Beffa
@ 2014-12-17 20:28     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-12-17 20:28 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> From 2b7df0f474c1e57eb31a81693500b686d177f3a1 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 10 Dec 2014 20:36:58 +0100
> Subject: [PATCH 2/4] gnu: Add xcffib
>
> * gnu/packages/python.scm (python-xcffib, python2-xcffib): New variables.

Fine with me, thank you!

Ludo’.

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

end of thread, other threads:[~2014-12-17 20:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14 19:40 [PATCH 2/4] gnu: Add xcffib Federico Beffa
2014-12-15 22:16 ` Ludovic Courtès
2014-12-16 17:17   ` Federico Beffa
2014-12-17  9:01     ` Ludovic Courtès
2014-12-17 16:57   ` Federico Beffa
2014-12-17 20:28     ` Ludovic Courtès

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).