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 disabledTests = [
63 # AssertionError: assert 42.1 == 'From development env'
64 "test_envless_load_file"
65 ];
66
67 disabledTestPaths = [
68 # import file mismatch
69 # imported module 'app_test' has this __file__ attribute:
70 # /build/source/tests_functional/issues/1005-key-type-error/app_test.py
71 # which is not the same as the test file we want to collect:
72 # /build/source/tests_functional/issues/994_validate_on_update_fix/app_test.py
73 "tests_functional/django_pytest_pure/app/tests"
74 "tests_functional/issues/575_603_666_690__envvar_with_template_substitution/app_test.py"
75 "tests_functional/issues/658_nested_envvar_override/app_test.py"
76 "tests_functional/issues/835_926_enable-merge-equal-false/app_test.py"
77 "tests_functional/issues/994_validate_on_update_fix/app_test.py"
78 "tests_functional/pytest_example/app/tests"
79 "tests_functional/pytest_example/flask/tests"
80 # flask.cli.NoAppException: Failed to find Flask application or factory in module 'app'
81 # Use 'app:name' to specify one
82 "tests/test_cli.py"
83 # sqlite3.OperationalError: no such table: auth_user
84 "tests_functional/django_pytest/app/tests/test_app.py::test_admin_user"
85 # unable connect port
86 "tests/test_redis.py"
87 # need docker
88 "tests/test_vault.py"
89 ];
90
91 # django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG
92 # but settings are not configured
93 env.DJANGO_SETTINGS_MODULE = "project.settings";
94
95 pythonImportsCheck = [ "dynaconf" ];
96
97 versionCheckProgramArg = "--version";
98
99 meta = {
100 description = "Dynamic configurator for Python Project";
101 homepage = "https://github.com/dynaconf/dynaconf";
102 changelog = "https://github.com/dynaconf/dynaconf/blob/${src.tag}/CHANGELOG.md";
103 mainProgram = "dynaconf";
104 license = lib.licenses.mit;
105 maintainers = with lib.maintainers; [ ];
106 };
107}