1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, django
2, factory_boy
3, glibcLocales
4, mock
5, pygments
6, pytest
7, pytest-cov
8, pytest-django
9, python-dateutil
10, shortuuid
11, six
12, tox
13, typing ? null
14, vobject
15, werkzeug
16}:
17
18buildPythonPackage rec {
19 pname = "django-extensions";
20 version = "3.1.3";
21
22 src = fetchFromGitHub {
23 owner = pname;
24 repo = pname;
25 rev = version;
26 sha256 = "03mhikhh49z8bxajbjf1j790b9c9vl4zf4f86iwz7g0zrd7jqlvm";
27 };
28
29 LC_ALL = "en_US.UTF-8";
30 __darwinAllowLocalNetworking = true;
31
32 propagatedBuildInputs = [ six ]
33 ++ lib.optional (pythonOlder "3.5") typing;
34
35 checkInputs = [
36 django
37 factory_boy
38 glibcLocales
39 mock
40 pygments # not explicitly declared in setup.py, but some tests require it
41 pytest
42 pytest-cov
43 pytest-django
44 python-dateutil
45 shortuuid
46 tox
47 vobject
48 werkzeug
49 ];
50
51 # remove tests that need network access
52 checkPhase = ''
53 rm tests/management/commands/test_pipchecker.py
54 DJANGO_SETTINGS_MODULE=tests.testapp.settings \
55 pytest django_extensions tests
56 '';
57
58 meta = with lib; {
59 description = "A collection of custom extensions for the Django Framework";
60 homepage = "https://github.com/django-extensions/django-extensions";
61 license = licenses.mit;
62 };
63}