Patchwork Add python-protobuf and python2-protobuf

login
register
mail settings
Submitter Daniel Pimentel
Date July 14, 2016, 3:23 p.m.
Message ID <14ea747c78d4d6a875cc68c5458ca79a@d4n1.org>
Download mbox | patch
Permalink /patch/13800/
State New
Headers show

Comments

Daniel Pimentel - July 14, 2016, 3:23 p.m.
> Thanks for this! Can you try building the python-3 version as well, and
> then using package-with-python2 to make python2-protobuf?

Guix,

Patches to add python-protobuf to Python3 and Python2.

Thanks,
Leo Famulari - July 22, 2016, 6:23 a.m.
On Thu, Jul 14, 2016 at 12:23:35PM -0300, Daniel Pimentel wrote:
> Guix,
> 
> Patches to add python-protobuf to Python3 and Python2.

Thanks!

I moved the packages to (gnu packages protobuf). Also, I updated them to
the latest upstream version (3.0.0b4) and removed a couple unused
inputs.

I committed the change in 8d63dddac.

Patch

From b5c6012f6d82e977a3eb968ce44e98e5a0a6d92f Mon Sep 17 00:00:00 2001
From: Daniel Pimentel <d4n1@d4n1.org>
Date: Thu, 14 Jul 2016 12:19:26 -0300
Subject: [PATCH 4/4] gnu: Add python-protobuf and python2-protobuf *
 gnu/packages/python.scm: Add python-protobuf and update python2-protobuf

---
 gnu/packages/python.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 35fa16b..c72126a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9343,9 +9343,9 @@  Response (QR) images.  It is recommended that the pillow library be used to
 generate images, though the default Python imaging library can also be used.")
     (license bsd-3)))
 
-(define-public python2-protobuf
+(define-public python-protobuf
   (package
-    (name "python2-protobuf")
+    (name "python-protobuf")
     (version "3.0.0b3")
     (source
      (origin
@@ -9358,14 +9358,16 @@  generate images, though the default Python imaging library can also be used.")
     (inputs
      `(("gcc" ,gcc)
        ("zlib" ,zlib)
-       ("python2-six" ,python2-six)))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
-    (arguments
-     `(#:python ,python-2))
+       ("python-six" ,python-six)))
     (home-page "https://github.com/google/protobuf")
     (synopsis "Protocol buffers is a data interchange format.")
     (description
      "Protocol buffers are a language-neutral, platform-neutral extensible 
 mechanism for serializing structured data.")
     (license bsd-3)))
+
+(define-public python2-protobuf
+  (package (inherit (package-with-python2
+                     (strip-python2-variant python-protobuf)))
+           (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                            ("python2-six" ,python2-six)))))
-- 
2.9.0