evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / django-extensions / default.nix
blob8e10c4c1f567edffe8c6f7c9b0326dc04e84f375
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch2,
7   # build-system
8   setuptools,
10   # dependencies
11   aiosmtpd,
12   django,
13   looseversion,
15   # tests
16   factory-boy,
17   mock,
18   pip,
19   pygments,
20   pytestCheckHook,
21   pytest-django,
22   shortuuid,
23   vobject,
24   werkzeug,
27 buildPythonPackage rec {
28   pname = "django-extensions";
29   version = "3.2.3";
30   pyproject = true;
32    src = fetchFromGitHub {
33     owner = pname;
34     repo = pname;
35     rev = "refs/tags/${version}";
36     hash = "sha256-A2+5FBv0IhTJPkwgd7je+B9Ac64UHJEa3HRBbWr2FxM=";
37   };
39   patches = [
40     (fetchpatch2 {
41       # Replace dead asyncore, smtp implementation with aiosmtpd
42       name = "django-extensions-aiosmtpd.patch";
43       url = "https://github.com/django-extensions/django-extensions/commit/37d56c4a4704c823ac6a4ef7c3de4c0232ceee64.patch";
44       hash = "sha256-49UeJQKO0epwY/7tqoiHgOXdgPcB/JBIZaCn3ulaHTg=";
45     })
46   ];
48   postPatch = ''
49     substituteInPlace setup.cfg \
50       --replace-fail "--cov=django_extensions --cov-report html --cov-report term" ""
52     substituteInPlace django_extensions/management/commands/pipchecker.py \
53       --replace-fail "from distutils.version" "from looseversion"
54   '';
56   build-system = [ setuptools ];
58   dependencies = [
59     aiosmtpd
60     django
61     looseversion
62   ];
64   __darwinAllowLocalNetworking = true;
66   nativeCheckInputs = [
67     factory-boy
68     mock
69     pip
70     pygments # not explicitly declared in setup.py, but some tests require it
71     pytest-django
72     pytestCheckHook
73     shortuuid
74     vobject
75     werkzeug
76   ];
78   disabledTests = [
79     # Mismatch in expectation of exception message
80     "test_installed_apps_no_resolve_conflicts_function"
81   ];
83   disabledTestPaths = [
84     # requires network access
85     "tests/management/commands/test_pipchecker.py"
86     # django.db.utils.OperationalError: no such table: django_extensions_permmodel
87     "tests/test_dumpscript.py"
88   ];
90   meta = with lib; {
91     description = "Collection of custom extensions for the Django Framework";
92     homepage = "https://github.com/django-extensions/django-extensions";
93     license = licenses.mit;
94   };