1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 ansible-core,
7 boto3,
8 commentjson,
9 configobj,
10 django,
11 django-debug-toolbar,
12 flask,
13 hvac,
14 ipython,
15 pytest-cov-stub,
16 pytest-mock,
17 pytest-xdist,
18 pytestCheckHook,
19 python-dotenv,
20 radon,
21 toml,
22 tox,
23 versionCheckHook,
24}:
25
26buildPythonPackage rec {
27 pname = "dynaconf";
28 version = "3.2.11";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "dynaconf";
33 repo = "dynaconf";
34 tag = version;
35 hash = "sha256-9E9us6niUtPJkZ89uKXz6wByoEERwxS/xW5qvkIXIhQ=";
36 };
37
38 build-system = [ setuptools ];
39
40 dependencies = [ ansible-core ];
41
42 nativeCheckInputs = [
43 boto3
44 commentjson
45 configobj
46 django
47 django-debug-toolbar
48 flask
49 hvac
50 ipython
51 pytest-cov-stub
52 pytest-mock
53 pytest-xdist
54 pytestCheckHook
55 python-dotenv
56 radon
57 toml
58 tox
59 versionCheckHook
60 ];
61
62 disabledTestPaths = [
63 # import file mismatch
64 # imported module 'app_test' has this __file__ attribute:
65 # /build/source/tests_functional/issues/1005-key-type-error/app_test.py
66 # which is not the same as the test file we want to collect:
67 # /build/source/tests_functional/issues/994_validate_on_update_fix/app_test.py
68 "tests_functional/django_pytest_pure/app/tests"
69 "tests_functional/issues/575_603_666_690__envvar_with_template_substitution/app_test.py"
70 "tests_functional/issues/658_nested_envvar_override/app_test.py"
71 "tests_functional/issues/835_926_enable-merge-equal-false/app_test.py"
72 "tests_functional/issues/994_validate_on_update_fix/app_test.py"
73 "tests_functional/pytest_example/app/tests"
74 "tests_functional/pytest_example/flask/tests"
75 # flask.cli.NoAppException: Failed to find Flask application or factory in module 'app'
76 # Use 'app:name' to specify one
77 "tests/test_cli.py"
78 # sqlite3.OperationalError: no such table: auth_user
79 "tests_functional/django_pytest/app/tests/test_app.py::test_admin_user"
80 # unable connect port
81 "tests/test_redis.py"
82 # need docker
83 "tests/test_vault.py"
84 ];
85
86 # django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG
87 # but settings are not configured
88 env.DJANGO_SETTINGS_MODULE = "project.settings";
89
90 pythonImportsCheck = [ "dynaconf" ];
91
92 versionCheckProgramArg = "--version";
93
94 meta = {
95 description = "Dynamic configurator for Python Project";
96 homepage = "https://github.com/dynaconf/dynaconf";
97 changelog = "https://github.com/dynaconf/dynaconf/blob/${src.tag}/CHANGELOG.md";
98 mainProgram = "dynaconf";
99 license = lib.licenses.mit;
100 maintainers = with lib.maintainers; [ ];
101 };
102}