diff mbox

New package: python-glances

Message ID 87k2ef1sbm.fsf@xsteve.at
State New
Headers show

Commit Message

Stefan Reichör Sept. 13, 2016, 8:02 p.m. UTC
None

Comments

Leo Famulari Sept. 14, 2016, 8:46 p.m. UTC | #1
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?
diff mbox

Patch

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