1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitLab,
6 poetry-core,
7 dramatiq,
8 pendulum,
9 setuptools,
10 pytest-mock,
11 pytestCheckHook,
12 versionCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "periodiq";
17 version = "0.13.0";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.5";
21
22 src = fetchFromGitLab {
23 owner = "bersace";
24 repo = "periodiq";
25 tag = "v${version}";
26 hash = "sha256-Pyh/T3/HGPYyaXjyM0wkQ1V7p5ibqxE1Q62QwCIJ8To=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace-fail 'poetry>=0.12' 'poetry-core' \
32 --replace-fail '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 versionCheckHook
47 ];
48 versionCheckProgramArg = "--version";
49
50 enabledTestPaths = [ "tests/unit" ];
51
52 pythonImportsCheck = [ "periodiq" ];
53
54 meta = {
55 description = "Simple Scheduler for Dramatiq Task Queue";
56 mainProgram = "periodiq";
57 homepage = "https://pypi.org/project/periodiq/";
58 license = lib.licenses.lgpl3Only;
59 maintainers = with lib.maintainers; [ traxys ];
60 };
61}