1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitLab,
6 poetry-core,
7 dramatiq,
8 pendulum,
9 setuptools,
10 pytest-mock,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "periodiq";
16 version = "0.12.1";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.5";
20
21 src = fetchFromGitLab {
22 owner = "bersace";
23 repo = "periodiq";
24 rev = "v${version}";
25 hash = "sha256-Ar0n+Wi1OUtRdhVxrU7Nz4je8ylaHgPZbXE0a30hzU0=";
26 };
27
28 postPatch = ''
29 substituteInPlace pyproject.toml \
30 --replace 'pendulum = "^2.0"' 'pendulum = "*"' \
31 --replace 'poetry>=0.12' 'poetry-core' \
32 --replace 'poetry.masonry.api' 'poetry.core.masonry.api'
33 '';
34
35 nativeBuildInputs = [ poetry-core ];
36
37 propagatedBuildInputs = [
38 dramatiq
39 pendulum
40 setuptools
41 ];
42
43 nativeCheckInputs = [
44 pytestCheckHook
45 pytest-mock
46 ];
47
48 pytestFlagsArray = [ "tests/unit" ];
49
50 pythonImportsCheck = [ "periodiq" ];
51
52 meta = with lib; {
53 description = "Simple Scheduler for Dramatiq Task Queue";
54 mainProgram = "periodiq";
55 homepage = "https://pypi.org/project/periodiq/";
56 license = licenses.lgpl3Only;
57 maintainers = with maintainers; [ traxys ];
58 };
59}