1{
2 lib,
3 buildPythonPackage,
4 django-taggit,
5 django,
6 fetchFromGitHub,
7 pytest-django,
8 pytestCheckHook,
9 pythonOlder,
10 pytz,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "django-modelcluster";
16 version = "6.4";
17 pyproject = true;
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchFromGitHub {
22 owner = "wagtail";
23 repo = "django-modelcluster";
24 tag = "v${version}";
25 hash = "sha256-JoDDHvZ9N+7hcIxRsbVrYW8/95iUcNHDQkvtmDVUzws=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 django
32 pytz
33 ];
34
35 optional-dependencies.taggit = [ django-taggit ];
36
37 env.DJANGO_SETTINGS_MODULE = "tests.settings";
38
39 nativeCheckInputs = [
40 pytest-django
41 pytestCheckHook
42 ]
43 ++ optional-dependencies.taggit;
44
45 pythonImportsCheck = [ "modelcluster" ];
46
47 meta = with lib; {
48 description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
49 homepage = "https://github.com/torchbox/django-modelcluster/";
50 changelog = "https://github.com/wagtail/django-modelcluster/blob/v${version}/CHANGELOG.txt";
51 license = licenses.bsd2;
52 };
53}