guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/7] gnu: Add python-distro.


From: contact . ng0
Subject: [PATCH 4/7] gnu: Add python-distro.
Date: Tue, 31 Jan 2017 12:53:36 +0000

From: ng0 <address@hidden>

* gnu/packages/python.scm (python-distro): New variable.
---
 gnu/packages/python.scm | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index cef9d2a8c..88762a412 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -23,7 +23,7 @@
 ;;; Copyright © 2016 Daniel Pimentel <address@hidden>
 ;;; Copyright © 2016 Sou Bunnbu <address@hidden>
 ;;; Copyright © 2016 Troy Sankey <address@hidden>
-;;; Copyright © 2016 ng0 <address@hidden>
+;;; Copyright © 2016, 2017 ng0 <address@hidden>
 ;;; Copyright © 2016 Dylan Jeffers <address@hidden@openmailbox.org>
 ;;; Copyright © 2016 David Craven <address@hidden>
 ;;; Copyright © 2016, 2017 Marius Bakke <address@hidden>
@@ -846,6 +846,44 @@ NetCDF files can also be read and modified.  Python-HDF4 
is a fork of
 (define-public python2-hdf4
   (package-with-python2 python-hdf4))
 
+(define-public python-distro
+(package
+  (name "python-distro")
+  (version "0.6.0")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "distro" version))
+      (sha256
+        (base32
+          "1xkj2id1b3b4ix3b4yrfy6pgcsp71n0fbq4475r17a4a8fj5f5v7"))))
+  (build-system python-build-system)
+  (inputs
+   `(("python-six" ,python-six)))
+  (home-page "https://github.com/nir0s/distro";)
+  (synopsis "alternative implementation for Python's 
platform.linux_distribution()")
+  (description
+   "The distro package provides information about the GNU-Linux distribution 
it runs on,
+such as a reliable machine-readable ID, or version information.
+It is a renewed alternative implementation for Python's original
+platform.linux_distribution function, which became necessary because Python 3.5
+deprecated this function, and Python 3.7 is expected to remove it altogether. 
+Its predecessor function platform.dist was already deprecated since Python 2.6 
and is
+also expected to be removed in Python 3.7.  The distro package implements a 
robust and
+inclusive way of retrieving the information about a GNU-Linux distribution 
based on new
+standards and old methods, namely from these data sources (from high to low 
precedence):
address@hidden
address@hidden The os-release file /etc/os-release, if present.
address@hidden The output of the lsb_release command, if available.
address@hidden The distro release file (/etc/*(-|_)(release|version)), if 
present.")
+  (license license:asl2.0)))
+
+(define-public python2-distro
+  (let ((distro (package-with-python2 python-distro)))
+    (package (inherit distro)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools))))))
+
 (define-public python-h5py
   (package
     (name "python-h5py")
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]