Merge pull request #117055 from dotlambda/drf-yasg-fix

This commit is contained in:
Sandro 2021-03-21 00:32:26 +01:00 committed by GitHub
commit 5147e2f017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,15 @@
{
lib,
buildPythonPackage,
fetchPypi,
inflection,
ruamel_yaml,
setuptools_scm,
six,
coreapi,
djangorestframework,
{ lib
, buildPythonPackage
, fetchPypi
, inflection
, ruamel_yaml
, setuptools_scm
, six
, coreapi
, djangorestframework
, pytestCheckHook
, pytest-django
, datadiff
}:
buildPythonPackage rec {
@ -19,6 +21,11 @@ buildPythonPackage rec {
sha256 = "d50f197c7f02545d0b736df88c6d5cf874f8fea2507ad85ad7de6ae5bf2d9e5a";
};
postPatch = ''
# https://github.com/axnsan12/drf-yasg/pull/710
substituteInPlace requirements/base.txt --replace packaging ""
'';
nativeBuildInputs = [
setuptools_scm
];
@ -31,6 +38,17 @@ buildPythonPackage rec {
djangorestframework
];
checkInputs = [
pytestCheckHook
pytest-django
datadiff
];
# ImportError: No module named 'testproj.settings'
doCheck = false;
pythonImportsCheck = [ "drf_yasg" ];
meta = with lib; {
description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
homepage = "https://github.com/axnsan12/drf-yasg";