1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, decorator
6, numpy
7, platformdirs
8, typing-extensions
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "pytools";
14 version = "2023.1.1";
15 disabled = pythonOlder "3.6";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-gGN4c9IG9rzt9820atk+horLTqIlbbBS38yocr3QMh8=";
20 };
21
22 propagatedBuildInputs = [
23 decorator
24 numpy
25 platformdirs
26 ] ++ lib.optionals (pythonOlder "3.11") [
27 typing-extensions
28 ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 ];
33
34 pythonImportsCheck = [
35 "pytools"
36 "pytools.batchjob"
37 "pytools.lex"
38 ];
39
40 meta = {
41 homepage = "https://github.com/inducer/pytools/";
42 description = "Miscellaneous Python lifesavers.";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ artuuge ];
45 };
46}