1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, django
6, six
7, python
8}:
9
10buildPythonPackage rec {
11 pname = "django-appconf";
12 version = "1.0.5";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "django-compressor";
19 repo = "django-appconf";
20 rev = "v${version}";
21 hash = "sha256-nS4Hwp/NYg1XGvZO1tiE9mzJA7WFifyvgAjyp3YpqS4=";
22 };
23
24 propagatedBuildInputs = [
25 django
26 ];
27
28 preCheck = ''
29 # prove we're running tests against installed package, not build dir
30 rm -r appconf
31 '';
32
33 checkPhase = ''
34 runHook preCheck
35 ${python.interpreter} -m django test --settings=tests.test_settings
36 runHook postCheck
37 '';
38
39 meta = with lib; {
40 description = "A helper class for handling configuration defaults of packaged apps gracefully";
41 homepage = "https://django-appconf.readthedocs.org/";
42 license = licenses.bsd2;
43 maintainers = with maintainers; [ desiderius ];
44 };
45}