all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* New package: python-glances
@ 2016-09-13 20:02 Stefan Reichör
  2016-09-14 20:46 ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Reichör @ 2016-09-13 20:02 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: 0001-gnu-Add-python-glances.patch --]
[-- Type: text/x-diff, Size: 1804 bytes --]

From b3fe1a718f76a7d21e600476c2720b0530edd354 Mon Sep 17 00:00:00 2001
From: Stefan Reichoer <stefan@xsteve.at>
Date: Tue, 13 Sep 2016 21:58:41 +0200
Subject: [PATCH] gnu: Add python-glances

---
 gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e2e1ec2..36d22c4 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -420,6 +421,33 @@ pidof, tty, taskset, pmap.")
 (define-public python2-psutil
   (package-with-python2 python-psutil))
 
+(define-public python-glances
+  (package
+  (name "python-glances")
+  (version "2.7.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "Glances" version))
+      (sha256
+        (base32
+          "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
+  (build-system python-build-system)
+  (native-inputs
+   `(("python-setuptools" ,python-setuptools)))
+  (inputs
+   `(("python-psutil" ,python-psutil)))
+  (home-page
+    "https://github.com/nicolargo/glances")
+  (synopsis
+    "A cross-platform curses-based monitoring tool")
+  (description
+    "Glances is a curses-based monitoring tool for GNU/Linux or BSD
+OS. Glances uses the PsUtil library to get information from your
+system. It monitors CPU, load, memory, network bandwidth, disk I/O,
+disk use, process.")
+    (license license:lgpl3+)))
+
 (define-public python-passlib
   (package
     (name "python-passlib")
-- 
2.7.4

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

* Re: New package: python-glances
  2016-09-13 20:02 New package: python-glances Stefan Reichör
@ 2016-09-14 20:46 ` Leo Famulari
  2016-09-16 19:50   ` Stefan Reichör
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2016-09-14 20:46 UTC (permalink / raw)
  To: Stefan Reichör; +Cc: guix-devel

On Tue, Sep 13, 2016 at 10:02:37PM +0200, Stefan Reichör wrote:
> Subject: [PATCH] gnu: Add python-glances

Thank you for this patch!

For Python software, we like to add packages for both the Python 3 and
Python 2 versions, if the software supports it. The PyPi page [0]
suggests that Glances does work on both Python 2 and 3.

> +  (native-inputs
> +   `(("python-setuptools" ,python-setuptools)))

I tried building without setuptools, and the build did succeed. However,
setuptools is probably required for the Python 2 variant of the package.

There is a recent example of how to do this in the commit "gnu: Add
python-lit, python2-lit." (243db8245e6d8ee6aae80ce4606fb58cb8b23443).

Can you send an updated patch that adds both python-glances and
python2-glances using the method demonstrated there?

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

* Re: New package: python-glances
  2016-09-14 20:46 ` Leo Famulari
@ 2016-09-16 19:50   ` Stefan Reichör
  2016-09-17 23:19     ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Reichör @ 2016-09-16 19:50 UTC (permalink / raw)
  To: guix-devel

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

Leo Famulari <leo@famulari.name> writes:

> On Tue, Sep 13, 2016 at 10:02:37PM +0200, Stefan Reichör wrote:
>> Subject: [PATCH] gnu: Add python-glances
>
> Thank you for this patch!
>
> For Python software, we like to add packages for both the Python 3 and
> Python 2 versions, if the software supports it. The PyPi page [0]
> suggests that Glances does work on both Python 2 and 3.
>
>> +  (native-inputs
>> +   `(("python-setuptools" ,python-setuptools)))
>
> I tried building without setuptools, and the build did succeed. However,
> setuptools is probably required for the Python 2 variant of the package.
>
> There is a recent example of how to do this in the commit "gnu: Add
> python-lit, python2-lit." (243db8245e6d8ee6aae80ce4606fb58cb8b23443).
>
> Can you send an updated patch that adds both python-glances and
> python2-glances using the method demonstrated there?

Thanks for your review.
You are correct the python2 version requires setuptools. I followed your
suggestion and added the python2-glances variant.

Stefan.


[-- Attachment #2: 0001-gnu-Add-python-glances-python2-glances.patch --]
[-- Type: text/x-diff, Size: 2095 bytes --]

From 369f06a41dc76c9016d1ca0565af28becef4ae63 Mon Sep 17 00:00:00 2001
From: Stefan Reichoer <stefan@xsteve.at>
Date: Fri, 16 Sep 2016 21:43:32 +0200
Subject: [PATCH] gnu: Add python-glances, python2-glances.

---
 gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 2f349c8..5e4dad0 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -420,6 +421,40 @@ pidof, tty, taskset, pmap.")
 (define-public python2-psutil
   (package-with-python2 python-psutil))
 
+(define-public python-glances
+  (package
+  (name "python-glances")
+  (version "2.7.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "Glances" version))
+      (sha256
+        (base32
+          "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
+  (build-system python-build-system)
+  (inputs
+   `(("python-psutil" ,python-psutil)))
+  (home-page
+    "https://github.com/nicolargo/glances")
+  (synopsis
+    "A cross-platform curses-based monitoring tool")
+  (description
+    "Glances is a curses-based monitoring tool for GNU/Linux or BSD
+OS. Glances uses the PsUtil library to get information from your
+system. It monitors CPU, load, memory, network bandwidth, disk I/O,
+disk use, process.")
+  (license license:lgpl3+)
+  (properties `((python2-variant . ,(delay python2-glances))))))
+
+(define-public python2-glances
+  (let ((base (package-with-python2 (strip-python2-variant python-glances))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-passlib
   (package
     (name "python-passlib")
-- 
2.7.4


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

* Re: New package: python-glances
  2016-09-16 19:50   ` Stefan Reichör
@ 2016-09-17 23:19     ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-09-17 23:19 UTC (permalink / raw)
  To: Stefan Reichör; +Cc: guix-devel

On Fri, Sep 16, 2016 at 09:50:23PM +0200, Stefan Reichör wrote:
> Leo Famulari <leo@famulari.name> writes:
> > Can you send an updated patch that adds both python-glances and
> > python2-glances using the method demonstrated there?
> 
> Thanks for your review.
> You are correct the python2 version requires setuptools. I followed your
> suggestion and added the python2-glances variant.
> 
> Stefan.
> 

> From 369f06a41dc76c9016d1ca0565af28becef4ae63 Mon Sep 17 00:00:00 2001
> From: Stefan Reichoer <stefan@xsteve.at>
> Date: Fri, 16 Sep 2016 21:43:32 +0200
> Subject: [PATCH] gnu: Add python-glances, python2-glances.

Thanks! Pushed as 4efb9c547870c61ef8971a28e6ccfaef38335ddb with some
minor edits to the commit message and the package description.

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

end of thread, other threads:[~2016-09-17 23:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 20:02 New package: python-glances Stefan Reichör
2016-09-14 20:46 ` Leo Famulari
2016-09-16 19:50   ` Stefan Reichör
2016-09-17 23:19     ` Leo Famulari

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.