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