1{
2 lib,
3 buildPythonPackage,
4 django,
5 djangorestframework,
6 fetchFromGitHub,
7 pytest-django,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "django-rest-registration";
14 version = "0.8.3";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "apragacz";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-RDegK+1A01kfpit3LX+ToViqPlTiZ3dIve38ea7lNxE=";
24 };
25
26 propagatedBuildInputs = [
27 django
28 djangorestframework
29 ];
30
31 nativeCheckInputs = [
32 pytestCheckHook
33 pytest-django
34 ];
35
36 pythonImportsCheck = [ "rest_registration" ];
37
38 disabledTests = [
39 # This test fails on Python 3.10
40 "test_convert_html_to_text_fails"
41 # This test is broken and was removed after 0.7.3. Remove this line once version > 0.7.3
42 "test_coreapi_autoschema_success"
43 ];
44
45 meta = with lib; {
46 description = "User-related REST API based on the awesome Django REST Framework";
47 homepage = "https://github.com/apragacz/django-rest-registration/";
48 changelog = "https://github.com/apragacz/django-rest-registration/releases/tag/${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ sephi ];
51 };
52}