depot/third_party/nixpkgs/pkgs/development/python-modules/connexion/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

80 lines
1.4 KiB
Nix

{ lib
, aiohttp
, aiohttp-jinja2
, aiohttp-remotes
, aiohttp-swagger
, buildPythonPackage
, clickclick
, decorator
, fetchFromGitHub
, flask
, inflection
, jsonschema
, openapi-spec-validator
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, swagger-ui-bundle
, testfixtures
}:
buildPythonPackage rec {
pname = "connexion";
version = "2.11.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "zalando";
repo = pname;
rev = version;
sha256 = "sha256-m/r09VNp/AMssOJH9RKMhPcObGHl9uIAoS1PwrjpKaE=";
};
propagatedBuildInputs = [
aiohttp
aiohttp-jinja2
aiohttp-swagger
clickclick
flask
inflection
jsonschema
openapi-spec-validator
pyyaml
requests
swagger-ui-bundle
];
checkInputs = [
aiohttp-remotes
decorator
pytest-aiohttp
pytestCheckHook
testfixtures
];
postPatch = ''
substituteInPlace setup.py \
--replace "PyYAML>=5.1,<6" "PyYAML>=5.1" \
--replace "jsonschema>=2.5.1,<4" "jsonschema>=2.5.1"
'';
disabledTests = [
# We have a later PyYAML release
"test_swagger_yaml"
];
pythonImportsCheck = [
"connexion"
];
meta = with lib; {
description = "Swagger/OpenAPI First framework on top of Flask";
homepage = "https://github.com/zalando/connexion/";
license = licenses.asl20;
maintainers = with maintainers; [ elohmeier ];
};
}