python.pkgs.odfpy: fix build

This commit is contained in:
Robert Schütz 2019-03-02 14:23:42 +01:00
parent f9ab0f25f8
commit 434c2a045b

View file

@ -3,6 +3,8 @@
, fetchPypi
, python
, isPy27
, defusedxml
, pytest
}:
buildPythonPackage rec {
@ -14,15 +16,17 @@ buildPythonPackage rec {
sha256 = "596021f0519623ca8717331951c95e3b8d7b21e86edc7efe8cb650a0d0f59a2b";
};
# 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
propagatedBuildInputs = [ defusedxml ];
checkInputs = [ pytest ];
checkPhase = ''
pytest
'';
meta = {
description = "Python API and tools to manipulate OpenDocument files";
homepage = "https://joinup.ec.europa.eu/software/odfpy/home";
homepage = https://github.com/eea/odfpy;
license = lib.licenses.asl20;
};
}