about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/django-extensions/default.nix
blob: 1e9a6ac764d337dccc8e670802e1ba40ee596f26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
, six, typing, pygments
, django, shortuuid, python-dateutil, pytest
, pytest-django, pytestcov, mock, vobject
, werkzeug, glibcLocales, factory_boy
}:

buildPythonPackage rec {
  pname = "django-extensions";
  version = "2.1.9";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = version;
    sha256 = "08vggm6wrn5cbf8brfprif0rjrkqz06wddsw0ir1skkk8q2sp1b2";
  };

  postPatch = ''
    substituteInPlace setup.py --replace "'tox'," ""

    # not yet pytest 5 compatible?
    rm tests/management/commands/test_set_fake_emails.py
    rm tests/management/commands/test_set_fake_passwords.py
    rm tests/management/commands/test_validate_templates.py

    # pip should not be used during tests...
    rm tests/management/commands/test_pipchecker.py
  '';

  propagatedBuildInputs = [ six ] ++ lib.optional (pythonOlder "3.5") typing;

  checkInputs = [
    django shortuuid python-dateutil pytest
    pytest-django pytestcov mock vobject
    werkzeug glibcLocales factory_boy pygments
  ];

  LC_ALL = "en_US.UTF-8";

  meta = with lib; {
    description = "A collection of custom extensions for the Django Framework";
    homepage = https://github.com/django-extensions/django-extensions;
    license = licenses.mit;
  };
}