summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2016-08-17 17:45:24 +0100
committerAlex Kost <alezost@gmail.com>2016-09-04 10:29:39 +0300
commitdddcb25c7f99ff229c5d5b0f7cbba4dc0ba78971 (patch)
tree33327a80179ae6874d5011489a936b5600deb822 /gnu/packages/python.scm
parentc4dd0defe16fbee282a31a8d8d0d399bc4bd9baa (diff)
gnu: Add python-odfpy.
* gnu/packages/python.scm (python-odfpy, python2-odfpy): New variables. Signed-off-by: Alex Kost <alezost@gmail.com>
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8b52548065..33674fa9d9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -26,6 +26,7 @@
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -10241,3 +10242,39 @@ time by mocking the datetime module.")
(native-inputs
`(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base))))))
+
+(define-public python-odfpy
+ (package
+ (name "python-odfpy")
+ (version "1.3.3")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "odfpy" version))
+ (sha256
+ (base32
+ "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
+ (arguments
+ `(#:modules ((srfi srfi-1)
+ (guix build python-build-system)
+ (guix build utils))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ ;; The test runner invokes python2 and python3 for test*.py.
+ ;; To avoid having both in inputs, we replicate it here.
+ (lambda _
+ (every (lambda (test-file)
+ (zero? (system* "python" test-file)))
+ (find-files "tests" "^test.*\\.py$")))))))
+ (build-system python-build-system)
+ (home-page "https://github.com/eea/odfpy")
+ (synopsis "Python API and tools to manipulate OpenDocument files")
+ (description "Collection of libraries and utility programs written in
+Python to manipulate OpenDocument 1.2 files.")
+ (license
+ ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
+ ;; number of files with other licenses.
+ (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
+
+(define-public python2-odfpy
+ (package-with-python2 python-odfpy))