1{ lib
2, buildPythonPackage
3, fetchPypi
4, python
5, isPy27
6}:
7
8buildPythonPackage rec {
9 pname = "odfpy";
10 version = "1.3.6";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "6bcaf3b23aa9e49ed8c8c177266539b211add4e02402748a994451482a10cb1b";
15 };
16
17 # Python 2.7 uses a different ordering for xml namespaces.
18 # The testAttributeForeign test expects "ns44", but fails since it gets "ns43"
19 checkPhase = " " + lib.optionalString (!isPy27) ''
20 ${python.interpreter} -m unittest discover -s tests
21 '';
22
23 meta = {
24 description = "Python API and tools to manipulate OpenDocument files";
25 homepage = "https://joinup.ec.europa.eu/software/odfpy/home";
26 license = lib.licenses.asl20;
27 };
28}