2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, simplejson
|
2021-07-17 21:14:59 +00:00
|
|
|
, mock
|
2020-04-24 23:36:52 +00:00
|
|
|
, twisted
|
|
|
|
, isPyPy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyutil";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "3.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-6hbSxVtvg0Eh3rYyp0VLCg+uJdXRMLFfa+l667B2yfw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-17 21:14:59 +00:00
|
|
|
propagatedBuildInputs = [ simplejson ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ mock twisted ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
prePatch = lib.optionalString isPyPy ''
|
2020-04-24 23:36:52 +00:00
|
|
|
grep -rl 'utf-8-with-signature-unix' ./ | xargs sed -i -e "s|utf-8-with-signature-unix|utf-8|g"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
2021-07-17 21:14:59 +00:00
|
|
|
homepage = "https://github.com/tpltnt/pyutil";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2021-07-17 21:14:59 +00:00
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|