1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, setuptoolsDarcs
5, setuptoolsTrial
6, simplejson
7, zbase32
8, twisted
9, isPyPy
10}:
11
12buildPythonPackage rec {
13 pname = "pyutil";
14 version = "3.1.0";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "8e254aa0a3b59e90515f7bca7ebc467b20a8d3fd2e26b63d196655c075da8d38";
19 };
20
21 buildInputs = [ setuptoolsDarcs setuptoolsTrial ] ++ (if doCheck then [ simplejson ] else []);
22 propagatedBuildInputs = [ twisted ];
23
24 # Tests fail because they try to write new code into the twisted
25 # package, apparently some kind of plugin.
26 doCheck = false;
27
28 prePatch = stdenv.lib.optionalString isPyPy ''
29 grep -rl 'utf-8-with-signature-unix' ./ | xargs sed -i -e "s|utf-8-with-signature-unix|utf-8|g"
30 '';
31
32 meta = with stdenv.lib; {
33 description = "Pyutil, a collection of mature utilities for Python programmers";
34
35 longDescription = ''
36 These are a few data structures, classes and functions which
37 we've needed over many years of Python programming and which
38 seem to be of general use to other Python programmers. Many of
39 the modules that have existed in pyutil over the years have
40 subsequently been obsoleted by new features added to the
41 Python language or its standard library, thus showing that
42 we're not alone in wanting tools like these.
43 '';
44
45 homepage = http://allmydata.org/trac/pyutil;
46 license = licenses.gpl2Plus;
47 };
48
49}