mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 14:47:06 +00:00
ced21f5e1a
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`.
29 lines
712 B
Nix
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;
|
|
};
|
|
}
|