1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 inflection,
6 ruamel-yaml,
7 setuptools-scm,
8 six,
9 coreapi,
10 djangorestframework,
11 pytestCheckHook,
12 pytest-django,
13 datadiff,
14}:
15
16buildPythonPackage rec {
17 pname = "drf-yasg";
18 version = "1.21.7";
19 format = "setuptools";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-TDuTBos9/KaWmrERFV5N1vey1oC5h3jej9Rgt4N72w0=";
24 };
25
26 postPatch = ''
27 # https://github.com/axnsan12/drf-yasg/pull/710
28 sed -i "/packaging/d" requirements/base.txt
29 '';
30
31 nativeBuildInputs = [ setuptools-scm ];
32
33 propagatedBuildInputs = [
34 six
35 inflection
36 ruamel-yaml
37 coreapi
38 djangorestframework
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 pytest-django
44 datadiff
45 ];
46
47 # ImportError: No module named 'testproj.settings'
48 doCheck = false;
49
50 pythonImportsCheck = [ "drf_yasg" ];
51
52 meta = with lib; {
53 description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
54 homepage = "https://github.com/axnsan12/drf-yasg";
55 maintainers = with maintainers; [ ];
56 license = licenses.bsd3;
57 };
58}