1{
2 lib,
3 arrow,
4 buildPythonPackage,
5 fetchFromGitHub,
6 freezegun,
7 pytestCheckHook,
8 pythonOlder,
9 pytz,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "python-datemath";
15 version = "3.0.3";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "nickmaccarthy";
22 repo = "python-datemath";
23 tag = "v${version}";
24 hash = "sha256-VwdY6Gmbmoy7EKZjUlWj56uSiE0OdegPiQv+rmigkq8=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [ arrow ];
30
31 nativeCheckInputs = [
32 freezegun
33 pytestCheckHook
34 pytz
35 ];
36
37 enabledTestPaths = [ "tests.py" ];
38
39 pythonImportsCheck = [ "datemath" ];
40
41 meta = {
42 description = "Python module to emulate the date math used in SOLR and Elasticsearch";
43 homepage = "https://github.com/nickmaccarthy/python-datemath";
44 changelog = "https://github.com/nickmaccarthy/python-datemath/blob/v${version}/CHANGELOG.md";
45 license = with lib.licenses; [ asl20 ];
46 maintainers = with lib.maintainers; [ fab ];
47 };
48}