depot/third_party/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

58 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, inflection
, ruamel-yaml
, setuptools-scm
, six
, coreapi
, djangorestframework
, pytestCheckHook
, pytest-django
, datadiff
}:
buildPythonPackage rec {
pname = "drf-yasg";
version = "1.21.3";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-su67Q4+mQVA6CNrHkb4kGD6ibbz+NxqYJOqR9uOpiKo=";
};
postPatch = ''
# https://github.com/axnsan12/drf-yasg/pull/710
sed -i "/packaging/d" requirements/base.txt
'';
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
six
inflection
ruamel-yaml
coreapi
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";
maintainers = with maintainers; [ ];
license = licenses.bsd3;
};
}