1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatchling,
6 numpy,
7 platformdirs,
8 pytestCheckHook,
9 pythonOlder,
10 typing-extensions,
11 siphash24,
12}:
13
14buildPythonPackage rec {
15 pname = "pytools";
16 version = "2025.2.4";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-nLgr50dW0ZIcArrTx2fr3kZ50tFDqFpMNY0y9lRuVG8=";
24 };
25
26 build-system = [ hatchling ];
27
28 dependencies = [
29 platformdirs
30 siphash24
31 typing-extensions
32 ];
33
34 optional-dependencies = {
35 numpy = [ numpy ];
36 };
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [
43 "pytools"
44 "pytools.batchjob"
45 "pytools.lex"
46 ];
47
48 meta = {
49 description = "Miscellaneous Python lifesavers";
50 homepage = "https://github.com/inducer/pytools/";
51 changelog = "https://github.com/inducer/pytools/releases/tag/v${version}";
52 license = lib.licenses.mit;
53 maintainers = with lib.maintainers; [ ];
54 };
55}