all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: contact.ng0@cryptolab.net
To: guix-devel@gnu.org
Cc: ng0 <ngillmann@runbox.com>
Subject: [PATCH 4/7] gnu: Add python-distro.
Date: Tue, 31 Jan 2017 12:53:36 +0000	[thread overview]
Message-ID: <20170131125339.18500-5-contact.ng0@cryptolab.net> (raw)
In-Reply-To: <20170131125339.18500-1-contact.ng0@cryptolab.net>

From: ng0 <ngillmann@runbox.com>

* 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 <d4n1@d4n1.org>
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
@@ -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):
+@enumerate
+@item The os-release file /etc/os-release, if present.
+@item The output of the lsb_release command, if available.
+@item 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

  parent reply	other threads:[~2017-01-31 12:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 12:13 Addition to tinycm patch-series (corrects patch 8) ng0
2016-09-25 17:39 ` Leo Famulari
2017-01-31 12:53   ` tinycm contact.ng0
2017-01-31 12:53     ` [PATCH 1/7] gnu: Add python-boolexp contact.ng0
2017-01-31 12:53     ` [PATCH 2/7] gnu: Add python-colorlog contact.ng0
2017-01-31 12:53     ` [PATCH 3/7] gnu: Add python2-ruamel.ordereddict contact.ng0
2017-02-02  4:53       ` Maxim Cournoyer
2017-02-02 10:13         ` ng0
2017-02-02 10:46         ` Hartmut Goebel
2017-02-02 14:03         ` Tobias Geerinckx-Rice
2017-02-05  9:11           ` Maxim Cournoyer
2017-01-31 12:53     ` contact.ng0 [this message]
2017-01-31 12:53     ` [PATCH 5/7] gnu: Add python-typing contact.ng0
2017-01-31 12:53     ` [PATCH 6/7] gnu: Add python-ruamel.yaml contact.ng0
2017-02-02  4:42       ` Maxim Cournoyer
2017-02-02 10:49         ` Hartmut Goebel
2017-01-31 12:53     ` [PATCH 7/7] gnu: Add tinycm contact.ng0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170131125339.18500-5-contact.ng0@cryptolab.net \
    --to=contact.ng0@cryptolab.net \
    --cc=guix-devel@gnu.org \
    --cc=ngillmann@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.