gnu: Add python-configobj.

* gnu/packages/python.scm (python-configobj, python2-configobj): New
  variables.
* gnu/packages/patches/python-configobj-setuptools.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
This commit is contained in:
Leo Famulari 2015-11-08 15:38:55 -05:00 committed by David Thompson
parent 5eea200518
commit 99fffa8ae0
3 changed files with 61 additions and 0 deletions

View File

@ -660,6 +660,7 @@ dist_patch_DATA = \
gnu/packages/patches/python-disable-ssl-test.patch \ gnu/packages/patches/python-disable-ssl-test.patch \
gnu/packages/patches/python-fix-tests.patch \ gnu/packages/patches/python-fix-tests.patch \
gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
gnu/packages/patches/python-configobj-setuptools.patch \
gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
gnu/packages/patches/qemu-CVE-2015-6855.patch \ gnu/packages/patches/qemu-CVE-2015-6855.patch \
gnu/packages/patches/qt4-ldflags.patch \ gnu/packages/patches/qt4-ldflags.patch \

View File

@ -0,0 +1,30 @@
From 16fbc38f13e435b4e3e1a37d706e64e05bad4691 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
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

View File

@ -6396,3 +6396,33 @@ addon modules.")
(define-public python2-werkzeug (define-public python2-werkzeug
(package-with-python2 python-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"))
;; Patch setup.py so it looks for python-setuptools, which is
;; required to parse the keyword 'install_requires' in setup.py.
(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 programmers 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))