From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 15/23] gnu: Add python-configobj. Date: Tue, 24 Nov 2015 16:02:15 -0500 Message-ID: <3329d8a185350139aab989909fd1a0bc48569dae.1448398884.git.leo@famulari.name> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1KhR-0002Dn-9x for guix-devel@gnu.org; Tue, 24 Nov 2015 16:00:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1KhP-0003cP-Rh for guix-devel@gnu.org; Tue, 24 Nov 2015 16:00:29 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1KhP-0003cJ-Me for guix-devel@gnu.org; Tue, 24 Nov 2015 16:00:27 -0500 Received: from jasmine.lan (c-69-249-5-231.hsd1.pa.comcast.net [69.249.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 505B26801AC for ; Tue, 24 Nov 2015 16:00:24 -0500 (EST) In-Reply-To: In-Reply-To: References: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/python.scm (python-configobj, python2-configobj): New variables. * gnu/packages/patches/python-configobj-setuptools.patch: New patch. --- .../patches/python-configobj-setuptools.patch | 30 ++++++++++++++++++++++ gnu/packages/python.scm | 28 ++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 gnu/packages/patches/python-configobj-setuptools.patch diff --git a/gnu/packages/patches/python-configobj-setuptools.patch b/gnu/packages/patches/python-configobj-setuptools.patch new file mode 100644 index 0000000..3f207ff --- /dev/null +++ b/gnu/packages/patches/python-configobj-setuptools.patch @@ -0,0 +1,30 @@ +From 16fbc38f13e435b4e3e1a37d706e64e05bad4691 Mon Sep 17 00:00:00 2001 +From: Leo Famulari +Date: Tue, 10 Nov 2015 23:09:24 -0500 +Subject: [PATCH] patch build to use setuptools + +--- + setup.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index c6d57a6..27bf260 100644 +--- a/setup.py ++++ b/setup.py +@@ -12,7 +12,12 @@ + # http://opensource.org/licenses/BSD-3-Clause + import os + import sys +-from distutils.core import setup ++ ++try: ++ from setuptools import setup ++except ImportError: ++ from distutils.core import setup ++ + # a simple import wouldn't work if we moved towards a package with __init__ + from _version import __version__ + +-- +2.6.2 + diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3758a48..4462591 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6293,3 +6293,31 @@ addon modules.") (define-public python2-werkzeug (package-with-python2 python-werkzeug)) + +(define-public python-configobj + (package + (name "python-configobj") + (version "5.0.6") + (source (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/c/configobj/" + "configobj-" version ".tar.gz")) + (sha256 + (base32 + "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2")) + (patches (list (search-patch "python-configobj-setuptools.patch"))))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools" ,python-setuptools) + ("python-six" ,python-six))) + (synopsis "Config file reading, writing and validation") + (description "ConfigObj is a simple but powerful config file reader and +writer: an ini file round tripper. Its main feature is that it is very easy to +use, with a straightforward programmer’s interface and a simple syntax for +config files.") + (home-page "https://github.com/DiffSK/configobj") + (license bsd-3))) + +(define-public python2-configobj + (package-with-python2 python-configobj)) -- 2.6.2