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