From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 12/13] gnu: Add python-rarfile. Date: Thu, 3 Mar 2016 20:26:38 -0500 Message-ID: <8c8f5af9405151b57f1db84e194a15723751a9f1.1457054741.git.leo@famulari.name> References: Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abeW0-0008Pq-8t for guix-devel@gnu.org; Thu, 03 Mar 2016 20:26:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abeVx-0002YI-Vw for guix-devel@gnu.org; Thu, 03 Mar 2016 20:26:48 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abeVx-0002YA-RZ for guix-devel@gnu.org; Thu, 03 Mar 2016 20:26:45 -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 56272C00021 for ; Thu, 3 Mar 2016 20:26:44 -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-rarfile, python2-rarfile): New variables. * gnu/packages/patches/python-rarfile-fix-tests.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + .../patches/python-rarfile-fix-tests.patch | 14 ++++++++++ gnu/packages/python.scm | 32 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/python-rarfile-fix-tests.patch diff --git a/gnu-system.am b/gnu-system.am index 46e5b11..30a3f58 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -681,6 +681,7 @@ dist_patch_DATA = \ gnu/packages/patches/python-disable-ssl-test.patch \ gnu/packages/patches/python-fix-tests.patch \ gnu/packages/patches/python-ipython-inputhook-ctype.patch \ + gnu/packages/patches/python-rarfile-fix-tests.patch \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ gnu/packages/patches/python-configobj-setuptools.patch \ gnu/packages/patches/python-paste-remove-website-test.patch \ diff --git a/gnu/packages/patches/python-rarfile-fix-tests.patch b/gnu/packages/patches/python-rarfile-fix-tests.patch new file mode 100644 index 0000000..8ae8894 --- /dev/null +++ b/gnu/packages/patches/python-rarfile-fix-tests.patch @@ -0,0 +1,14 @@ +There is no test.sh, but there are test1.sh and test2.sh. + +diff --git a/test/Makefile b/test/Makefile +index 027bc5f..5383db3 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -1,5 +1,6 @@ + test: +- ./test.sh ++ ./test1.sh ++ ./test2.sh + + clean: + rm -rf __pycache__ diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index ce7d777..fa021c7 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8365,3 +8365,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)) -- 2.6.3