nixpkgs/pkgs/development/python-modules/odfpy/default.nix

29 lines
712 B
Nix
Raw Normal View History

2017-08-25 01:40:49 -07:00
{ lib
, buildPythonPackage
, fetchPypi
2018-01-01 01:56:31 -08:00
, python
2018-01-04 00:51:14 -08:00
, isPy27
2017-08-25 01:40:49 -07:00
}:
buildPythonPackage rec {
pname = "odfpy";
2019-02-13 23:37:22 -08:00
version = "1.4.0";
2017-08-25 01:40:49 -07:00
src = fetchPypi {
inherit pname version;
2019-02-13 23:37:22 -08:00
sha256 = "596021f0519623ca8717331951c95e3b8d7b21e86edc7efe8cb650a0d0f59a2b";
2017-08-25 01:40:49 -07:00
};
2018-01-04 00:51:14 -08:00
# 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) ''
2018-01-01 01:56:31 -08:00
${python.interpreter} -m unittest discover -s tests
2017-08-25 01:40:49 -07:00
'';
meta = {
description = "Python API and tools to manipulate OpenDocument files";
homepage = "https://joinup.ec.europa.eu/software/odfpy/home";
license = lib.licenses.asl20;
};
}