nixpkgs/pkgs/development/python-modules/odfpy/default.nix
Frederik Rietdijk ced21f5e1a pythonPackages: remove name attribute`
The `buildPython*` function computes name from `pname` and `version`.
This change removes `name` attribute from all expressions in
`pkgs/development/python-modules`.

While at it, some other minor changes were made as well, such as
replacing `fetchurl` calls with `fetchPypi`.
2018-06-23 18:14:26 +02:00

29 lines
712 B
Nix

{ 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;
};
}