depot/third_party/nixpkgs/pkgs/development/python-modules/connexion/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01: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.12.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "zalando";
repo = pname;
rev = version;
sha256 = "sha256-JMuI3h0Pg7nCXrJtF0fhSFJTOWelEqcvmqv3ooIfkqM=";
};
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 ];
};
}