depot/third_party/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

58 lines
1.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.7";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-TDuTBos9/KaWmrERFV5N1vey1oC5h3jej9Rgt4N72w0=";
};
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
];
nativeCheckInputs = [
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 = [ ];
license = licenses.bsd3;
};
}