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