Merge pull request #122629 from fabaff/fix-connexion
python3Packages.connexion: 2.4.0 -> 2.7.0
This commit is contained in:
commit
1a2c4384f2
|
@ -1,89 +1,60 @@
|
||||||
{ buildPythonPackage
|
{ lib
|
||||||
, fetchFromGitHub
|
|
||||||
, isPy3k
|
|
||||||
, glibcLocales
|
|
||||||
, lib
|
|
||||||
, pythonOlder
|
|
||||||
|
|
||||||
, aiohttp
|
, aiohttp
|
||||||
, aiohttp-swagger
|
|
||||||
, aiohttp-jinja2
|
, aiohttp-jinja2
|
||||||
|
, aiohttp-remotes
|
||||||
|
, aiohttp-swagger
|
||||||
|
, buildPythonPackage
|
||||||
, clickclick
|
, clickclick
|
||||||
, decorator
|
, decorator
|
||||||
, flake8
|
, fetchFromGitHub
|
||||||
, flask
|
, flask
|
||||||
, gevent
|
|
||||||
, inflection
|
, inflection
|
||||||
, jsonschema
|
, jsonschema
|
||||||
, mock
|
|
||||||
, openapi-spec-validator
|
, openapi-spec-validator
|
||||||
, pathlib
|
|
||||||
, pytest
|
|
||||||
, pytest-aiohttp
|
, pytest-aiohttp
|
||||||
, pytestcov
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, requests
|
, requests
|
||||||
, six
|
|
||||||
, swagger-ui-bundle
|
, swagger-ui-bundle
|
||||||
, testfixtures
|
, testfixtures
|
||||||
, typing ? null
|
|
||||||
, ujson
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "connexion";
|
pname = "connexion";
|
||||||
version = "2.4.0";
|
version = "2.7.0";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
# we're fetching from GitHub because tests weren't distributed on PyPi
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "zalando";
|
owner = "zalando";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1b9q027wrks0afl7l3a1wxymz3aick26b9fq2m07pc5wb9np0vvg";
|
sha256 = "15iflq5403diwda6n6qrpq67wkdcvl3vs0gsg0fapxqnq3a2m7jj";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
decorator
|
|
||||||
mock
|
|
||||||
pytest
|
|
||||||
pytestcov
|
|
||||||
testfixtures
|
|
||||||
flask
|
|
||||||
swagger-ui-bundle
|
|
||||||
]
|
|
||||||
++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson pytest-aiohttp ]
|
|
||||||
++ lib.optional (pythonOlder "3.7") glibcLocales
|
|
||||||
;
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
aiohttp
|
||||||
|
aiohttp-jinja2
|
||||||
|
aiohttp-swagger
|
||||||
clickclick
|
clickclick
|
||||||
|
flask
|
||||||
|
inflection
|
||||||
jsonschema
|
jsonschema
|
||||||
|
openapi-spec-validator
|
||||||
pyyaml
|
pyyaml
|
||||||
requests
|
requests
|
||||||
six
|
|
||||||
inflection
|
|
||||||
openapi-spec-validator
|
|
||||||
swagger-ui-bundle
|
swagger-ui-bundle
|
||||||
flask
|
];
|
||||||
]
|
|
||||||
++ lib.optional (pythonOlder "3.4") pathlib
|
|
||||||
++ lib.optional (pythonOlder "3.6") typing
|
|
||||||
++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson ]
|
|
||||||
;
|
|
||||||
|
|
||||||
preConfigure = lib.optional (pythonOlder "3.7") ''
|
checkInputs = [
|
||||||
export LANG=en_US.UTF-8
|
aiohttp-remotes
|
||||||
'';
|
decorator
|
||||||
|
pytest-aiohttp
|
||||||
|
pytestCheckHook
|
||||||
|
testfixtures
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
pythonImportsCheck = [ "connexion" ];
|
||||||
substituteInPlace setup.py --replace "'aiohttp>=2.3.10,<3.5.2'" "'aiohttp>=2.3.10'"
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkPhase = if isPy3k then ''
|
|
||||||
pytest -k "not test_app_get_root_path and \
|
|
||||||
not test_verify_oauth_scopes_remote and \
|
|
||||||
not test_verify_oauth_scopes_local and \
|
|
||||||
not test_run_with_aiohttp_not_installed"''
|
|
||||||
else "pytest --ignore=tests/aiohttp";
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Swagger/OpenAPI First framework on top of Flask";
|
description = "Swagger/OpenAPI First framework on top of Flask";
|
||||||
|
|
Loading…
Reference in New Issue