guix-commits
[Top][All Lists]
Advanced

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

04/04: gnu: Add python2-rdflib.


From: Andreas Enge
Subject: 04/04: gnu: Add python2-rdflib.
Date: Tue, 24 Feb 2015 23:58:36 +0000

andreas pushed a commit to branch master
in repository guix.

commit da71f145c6bf1aab4e5e9378609f4d5d6eae1093
Author: Andreas Enge <address@hidden>
Date:   Wed Feb 25 00:56:31 2015 +0100

    gnu: Add python2-rdflib.
    
    * gnu/packages/rdf.scm (python2-rdflib): New variable.
      (python-rdflib): Add patch.
    * gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch: New file.
    * gnu-system.am (dist_patch_DATA): Register patch.
---
 gnu-system.am                                      |    1 +
 .../python2-rdflib-drop-sparqlwrapper.patch        |   16 ++++++++++++++++
 gnu/packages/rdf.scm                               |   13 +++++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index dfd672b..76ef6f8 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -479,6 +479,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/python-fix-tests.patch                  \
   gnu/packages/patches/python-libffi-mips-n32-fix.patch                \
   gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch      \
+  gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
   gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch     \
   gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
   gnu/packages/patches/qt4-tests.patch                         \
diff --git a/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch 
b/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch
new file mode 100644
index 0000000..53f8fde
--- /dev/null
+++ b/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch
@@ -0,0 +1,16 @@
+Drop SPARQLWrapper from the required install inputs under Python 2, as it
+creates a circular dependency.
+
+diff -u rdflib-4.1.2.alt/setup.py rdflib-4.1.2/setup.py
+--- rdflib-4.1.2.alt/setup.py  2014-03-04 12:40:26.000000000 +0100
++++ rdflib-4.1.2/setup.py      2015-01-23 21:52:59.000000000 +0100
+@@ -52,7 +52,7 @@
+         kwargs['test_suite'] = "nose.collector"
+         kwargs['install_requires'] = [
+             'isodate',
+-            'pyparsing', 'SPARQLWrapper']
++            'pyparsing']
+ 
+         if sys.version_info[1]<7:  # Python 2.6
+             kwargs['install_requires'].append('ordereddict')
+
diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm
index 6895b36..ab6eb89 100644
--- a/gnu/packages/rdf.scm
+++ b/gnu/packages/rdf.scm
@@ -319,6 +319,9 @@ system.")
               "https://pypi.python.org/packages/source/r/rdflib/rdflib-";
               version
               ".tar.gz"))
+        (patches
+          ;; The patch has no effect under Python 3.
+          (list (search-patch "python2-rdflib-drop-sparqlwrapper.patch")))
         (sha256
           (base32
             "0kvaf332cqbi47rqzlpdx4mbkvw12mkrzkj8n9l19wk713d4py9w"))))
@@ -336,3 +339,13 @@ system.")
 powerful language for representing information.")
     (license (bsd-style "file://LICENSE"
                         "See LICENSE in the distribution."))))
+
+(define-public python2-rdflib
+  (let ((base (package-with-python2 python-rdflib)))
+    (package
+      (inherit base)
+      (inputs
+        (append (package-inputs base)
+                `(("python2-nose" ,python2-nose))))
+      (arguments
+        `(#:tests? #f))))) ; 3 tests fail, also outside Guix



reply via email to

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