summary refs log tree commit diff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-02-14 02:12:27 -0500
committerLeo Famulari <leo@famulari.name>2016-03-18 14:27:16 -0400
commit064503aaa2aaceecc4e4df835f7e5a72e8a7c4a7 (patch)
tree4722c642faaf23e5b7b66bf8e3daf287d786c0e3 /gnu/packages/python.scm
parent13edb0e5c36181bc8a48fa6a28005b3e3046174a (diff)
downloadguix-064503aaa2aaceecc4e4df835f7e5a72e8a7c4a7.tar.gz
gnu: Add python-rarfile.
* gnu/packages/python.scm (python-rarfile, python2-rarfile): New
variables.
* gnu/packages/patches/python-rarfile-fix-tests.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 75481fc5b6..97a69c3a1b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8438,3 +8438,35 @@ encoding algorithms to do fuzzy string matching.")
     (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
 module, adding support for Unicode strings.")
     (license bsd-2)))
+
+(define-public python-rarfile
+  (package
+    (name "python-rarfile")
+    (version "2.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "rarfile" version))
+              (sha256
+               (base32
+                "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
+              ;; https://github.com/markokr/rarfile/pull/17/
+              (patches (list (search-patch "python-rarfile-fix-tests.patch")))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           ;; Many tests fail, but the installation proceeds.
+           (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
+    (native-inputs
+     `(("which" ,which))) ; required for tests
+    (propagated-inputs
+     `(("libarchive" ,libarchive)))
+    (home-page "https://github.com/markokr/rarfile")
+    (synopsis "RAR archive reader for Python")
+    (description "This is Python module for RAR archive reading.  The interface
+is made as zipfile like as possible.")
+    (license isc)))
+
+(define-public python2-rarfile
+  (package-with-python2 python-rarfile))