1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7 importlib-resources,
8 pygments,
9 tqdm,
10 flask,
11 multiprocess,
12 docutils,
13 sphinx,
14 sphinx-autodoc-typehints,
15 sphinx-rtd-theme,
16 sphinx-versions,
17 sphinxcontrib-images,
18 ipywidgets,
19 numpy,
20 rich,
21 pytestCheckHook,
22}:
23
24buildPythonPackage rec {
25 pname = "mpire";
26 version = "2.10.2";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "sybrenjansen";
31 repo = "mpire";
32 tag = "v${version}";
33 hash = "sha256-6O+k8gSMCu4zhj7KzbsC5UUCU/TG/g3dYsGVuvcy25E=";
34 };
35
36 build-system = [
37 setuptools
38 wheel
39 ];
40
41 dependencies = [
42 importlib-resources
43 pygments
44 tqdm
45 ];
46
47 optional-dependencies = {
48 dashboard = [
49 flask
50 ];
51 dill = [
52 multiprocess
53 ];
54 docs = [
55 docutils
56 sphinx
57 sphinx-autodoc-typehints
58 sphinx-rtd-theme
59 sphinx-versions
60 sphinxcontrib-images
61 ];
62 testing = [
63 ipywidgets
64 multiprocess
65 numpy
66 rich
67 ];
68 };
69
70 pythonImportsCheck = [
71 "mpire"
72 ];
73
74 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.testing;
75
76 enabledTestPaths = [ "tests" ];
77
78 meta = {
79 description = "Python package for easy multiprocessing, but faster than multiprocessing";
80 homepage = "https://pypi.org/project/mpire/";
81 license = lib.licenses.mit;
82 maintainers = with lib.maintainers; [ booxter ];
83 };
84}