depot/third_party/nixpkgs/pkgs/development/python-modules/apispec/default.nix
Default email dae973cb59 Project import generated by Copybara.
GitOrigin-RevId: c90c4025bb6e0c4eaf438128a3b2640314b1c58d
2023-03-08 18:32:21 +02:00

59 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, marshmallow
, mock
, openapi-spec-validator
, packaging
, prance
, pytestCheckHook
, pythonOlder
, pyyaml
}:
buildPythonPackage rec {
pname = "apispec";
version = "6.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-GpSaYLtMQr7leqr11DwYTfPi6W2WWORC513UQ1z2CWE=";
};
propagatedBuildInputs = [
packaging
];
passthru.optional-dependencies = {
marshmallow = [
marshmallow
];
yaml = [
pyyaml
];
validation = [
openapi-spec-validator
prance
] ++ prance.optional-dependencies.osv;
};
nativeCheckInputs = [
mock
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"apispec"
];
meta = with lib; {
changelog = "https://github.com/marshmallow-code/apispec/blob/${version}/CHANGELOG.rst";
description = "A pluggable API specification generator with support for the OpenAPI Specification";
homepage = "https://github.com/marshmallow-code/apispec";
license = licenses.mit;
maintainers = with maintainers; [ costrouc ];
};
}