* [PATCH] gnu: python: add pyserial.
@ 2016-08-15 12:25 Danny Milosavljevic
2016-08-16 0:29 ` Leo Famulari
0 siblings, 1 reply; 4+ messages in thread
From: Danny Milosavljevic @ 2016-08-15 12:25 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
* gnu/packages/python.scm (python-pyserial, python-pyserial2): New variables.
---
gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-python-add-pyserial.patch --]
[-- Type: text/x-patch; name="0001-gnu-python-add-pyserial.patch", Size: 1493 bytes --]
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5cc54d0..36c5d52 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9886,3 +9886,37 @@ 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 (string-append
+ "https://pypi.python.org/packages/"
+ "3c/d8/a9fa247ca60b02b3bebbd61766b4f321393b57b13c53b18f6f62cf172c08/"
+ "pyserial-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (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 license:bsd-3)))
+
+(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))))))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: python: add pyserial.
2016-08-15 12:25 [PATCH] gnu: python: add pyserial Danny Milosavljevic
@ 2016-08-16 0:29 ` Leo Famulari
2016-08-16 1:40 ` [PATCH v2] gnu: python: Add pyserial Danny Milosavljevic
0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2016-08-16 0:29 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
On Mon, Aug 15, 2016 at 02:25:01PM +0200, Danny Milosavljevic wrote:
>
> * gnu/packages/python.scm (python-pyserial, python-pyserial2): New variables.
Thank for this package!
> + (uri (string-append
> + "https://pypi.python.org/packages/"
> + "3c/d8/a9fa247ca60b02b3bebbd61766b4f321393b57b13c53b18f6f62cf172c08/"
> + "pyserial-" version ".tar.gz"))
It's much shorter to use pypi-uri.
> + (inputs
> + `(("python-setuptools" ,python-setuptools)))
Was this left in from some previous version of the package? If so, it
should be removed, and you will need to add a (properties ...) field to
make the python2-variant system work for python2-pyserial. See the
package definition of python-pythondialog for an example.
> + (license license:bsd-3)))
The "license:" prefix should be removed. The package can't be built with
it.
Can you send an updated patch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] gnu: python: Add pyserial.
2016-08-16 0:29 ` Leo Famulari
@ 2016-08-16 1:40 ` Danny Milosavljevic
2016-08-16 17:19 ` Leo Famulari
0 siblings, 1 reply; 4+ messages in thread
From: Danny Milosavljevic @ 2016-08-16 1:40 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
gnu: python: Add pyserial.
* gnu/packages/python.scm (python-pyserial, python-pyserial2): New variables.
---
gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-python-Add-pyserial.patch --]
[-- Type: text/x-patch; name="0001-gnu-python-Add-pyserial.patch", Size: 1319 bytes --]
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))))))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] gnu: python: Add pyserial.
2016-08-16 1:40 ` [PATCH v2] gnu: python: Add pyserial Danny Milosavljevic
@ 2016-08-16 17:19 ` Leo Famulari
0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-08-16 17:19 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
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!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-16 17:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15 12:25 [PATCH] gnu: python: add pyserial Danny Milosavljevic
2016-08-16 0:29 ` Leo Famulari
2016-08-16 1:40 ` [PATCH v2] gnu: python: Add pyserial Danny Milosavljevic
2016-08-16 17:19 ` Leo Famulari
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).