summary refs log tree commit diff
path: root/pkgs/development/python-modules/odfpy/default.nix
blob: 161272ce1a73e96cf13118ff8c31f41ac69ee365 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib
, buildPythonPackage
, fetchPypi
, python
, isPy27
}:

buildPythonPackage rec {
  pname = "odfpy";
  version = "1.3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "6bcaf3b23aa9e49ed8c8c177266539b211add4e02402748a994451482a10cb1b";
  };

  # Python 2.7 uses a different ordering for xml namespaces.
  # The testAttributeForeign test expects "ns44", but fails since it gets "ns43"
  checkPhase = " " + lib.optionalString (!isPy27) ''
    ${python.interpreter} -m unittest discover -s tests
  '';

  meta = {
    description = "Python API and tools to manipulate OpenDocument files";
    homepage = "https://joinup.ec.europa.eu/software/odfpy/home";
    license = lib.licenses.asl20;
  };
}