diff mbox

[v2] gnu: python: Add pyserial.

Message ID 20160816014043.21149-1-dannym@scratchpost.org
State New
Headers show

Commit Message

Danny Milosavljevic Aug. 16, 2016, 1:40 a.m. UTC
gnu: python: Add pyserial.

* gnu/packages/python.scm (python-pyserial, python-pyserial2): New variables.
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Leo Famulari Aug. 16, 2016, 5:19 p.m. UTC | #1
On Tue, Aug 16, 2016 at 03:40:43AM +0200, Danny Milosavljevic wrote:
> gnu: python: Add pyserial.
> 
> * gnu/packages/python.scm (python-pyserial, python-pyserial2): New variables.

Thanks, pushed as 517a6c0c6e4!
diff mbox

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5cc54d0..8a2f094 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9886,3 +9886,32 @@  relays publish about themselves.")
 
 (define-public python2-stem
   (package-with-python2 python-stem))
+
+(define-public python-pyserial
+ (package
+  (name "python-pyserial")
+  (version "3.1.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "pyserial" version))
+      (sha256
+        (base32
+          "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
+  (build-system python-build-system)
+  (home-page
+    "https://github.com/pyserial/pyserial")
+  (synopsis "Python Serial Port Bindings")
+  (description "@code{pyserial} provide serial port bindings for Python. 
+It supports different byte sizes, stop bits, parity and flow control with RTS/CTS and/or Xon/Xoff. 
+The port is accessed in RAW mode.")
+  (license bsd-3)
+  (properties `((python2-variant . ,(delay python2-pyserial))))))
+
+(define-public python2-pyserial
+  (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))