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
15, vobject
16, werkzeug
17}:
18
19buildPythonPackage rec {
20 pname = "django-extensions";
21 version = "3.0.8";
22
23 src = fetchFromGitHub {
24 owner = pname;
25 repo = pname;
26 rev = version;
27 sha256 = "1z2si9wpc8irqhi5i2wp4wr05dqxyw4mn2vj3amp0rvsvydws92c";
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 # tests not compatible with pip>=20
53 checkPhase = ''
54 rm tests/management/commands/test_pipchecker.py
55 ${python.interpreter} setup.py test
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}