1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # optional-dependencies
10 dill,
11 flask,
12 graphviz,
13 multiprocess,
14 regex,
15 requests,
16 sphinx,
17 sphinx-click,
18
19 # tests
20 pytestCheckHook,
21 ddt,
22 cryptography,
23 schedula,
24}:
25
26buildPythonPackage rec {
27 pname = "schedula";
28 version = "1.5.64";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "vinci1it2000";
33 repo = "schedula";
34 tag = "v${version}";
35 hash = "sha256-huMhJTMiTVrKyZ5z0dFfw61GHyLbpHNtZGXP4gmUdTs=";
36 };
37
38 build-system = [ setuptools ];
39
40 optional-dependencies = rec {
41 # dev omitted, we have nativeCheckInputs for this
42 # form omitted, as it pulls in a kitchensink of deps, some not even packaged in nixpkgs
43 io = [ dill ];
44 parallel = [ multiprocess ];
45 plot = [
46 requests
47 graphviz
48 regex
49 flask
50 ];
51 sphinx = [
52 sphinx
53 sphinx-click
54 ]
55 ++ plot;
56 web = [
57 requests
58 regex
59 flask
60 ];
61 };
62
63 nativeCheckInputs = [
64 cryptography # doctests
65 ddt
66 sphinx
67 pytestCheckHook
68 ]
69 ++ schedula.optional-dependencies.io
70 ++ schedula.optional-dependencies.parallel
71 ++ schedula.optional-dependencies.plot;
72
73 disabledTests = [
74 # FAILED tests/test_setup.py::TestSetup::test_long_description - ModuleNotFoundError: No module named 'sphinxcontrib.writers'
75 "test_long_description"
76 ];
77
78 disabledTestPaths = [
79 # ERROR tests/utils/test_form.py::TestDispatcherForm::test_form1 - ModuleNotFoundError: No module named 'chromedriver_autoinstaller'
80 # ERROR tests/utils/test_form.py::TestDispatcherForm::test_form_stripe - ModuleNotFoundError: No module named 'chromedriver_autoinstaller'
81 "tests/utils/test_form.py"
82 ];
83
84 pythonImportsCheck = [ "schedula" ];
85
86 meta = {
87 description = "Smart function scheduler for dynamic flow-based programming";
88 homepage = "https://github.com/vinci1it2000/schedula";
89 changelog = "https://github.com/vinci1it2000/schedula/blob/v${version}/CHANGELOG.rst";
90 license = lib.licenses.eupl11;
91 maintainers = with lib.maintainers; [ flokli ];
92 # at least some tests fail on Darwin
93 platforms = lib.platforms.linux;
94 };
95}