1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 django,
7 django-configurations,
8 djangorestframework,
9 joserfc,
10 mozilla-django-oidc,
11 pyjwt,
12 requests,
13 requests-toolbelt,
14 factory-boy,
15 pytest-django,
16 responses,
17 celery,
18 pytestCheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "django-lasuite";
23 version = "0.0.14";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "suitenumerique";
28 repo = "django-lasuite";
29 tag = "v${version}";
30 hash = "sha256-v4VSiZf/gpCrD/YGcEQpj6mYJUaxatqktwI+NL+oF7A=";
31 };
32
33 build-system = [ hatchling ];
34
35 dependencies = [
36 django
37 django-configurations
38 djangorestframework
39 joserfc
40 mozilla-django-oidc
41 pyjwt
42 requests
43 requests-toolbelt
44 ];
45
46 pythonRelaxDeps = true;
47
48 nativeCheckInputs = [
49 celery
50 pytestCheckHook
51 pytest-django
52 factory-boy
53 responses
54 ];
55
56 preCheck = ''
57 export PYTHONPATH=tests:$PYTHONPATH
58 export DJANGO_SETTINGS_MODULE=test_project.settings
59 '';
60
61 pythonImportsCheck = [ "lasuite" ];
62
63 meta = {
64 description = "Common library for La Suite Django projects and Proconnected Django projects";
65 homepage = "https://github.com/suitenumerique/django-lasuite";
66 changelog = "https://github.com/suitenumerique/django-lasuite/blob/${src.tag}/CHANGELOG.md";
67 license = lib.licenses.mit;
68 maintainers = with lib.maintainers; [ soyouzpanda ];
69 broken = lib.versionOlder django.version "5.2";
70 };
71}