about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyutil/default.nix
blob: dd1c7b2da5b03f9b3b1a67a388404f0790943102 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ lib
, buildPythonPackage
, fetchPypi
, setuptoolsDarcs
, setuptoolsTrial
, simplejson
, twisted
, isPyPy
}:

buildPythonPackage rec {
  pname = "pyutil";
  version = "3.3.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "8c4d4bf668c559186389bb9bce99e4b1b871c09ba252a756ccaacd2b8f401848";
  };

  buildInputs = [ setuptoolsDarcs setuptoolsTrial ] ++ (if doCheck then [ simplejson ] else []);
  propagatedBuildInputs = [ twisted ];

  # Tests fail because they try to write new code into the twisted
  # package, apparently some kind of plugin.
  doCheck = false;

  prePatch = lib.optionalString isPyPy ''
    grep -rl 'utf-8-with-signature-unix' ./ | xargs sed -i -e "s|utf-8-with-signature-unix|utf-8|g"
  '';

  meta = with lib; {
    description = "Pyutil, a collection of mature utilities for Python programmers";

    longDescription = ''
      These are a few data structures, classes and functions which
      we've needed over many years of Python programming and which
      seem to be of general use to other Python programmers. Many of
      the modules that have existed in pyutil over the years have
      subsequently been obsoleted by new features added to the
      Python language or its standard library, thus showing that
      we're not alone in wanting tools like these.
    '';

    homepage = "http://allmydata.org/trac/pyutil";
    license = licenses.gpl2Plus;
  };

}