2017-09-05 09:16:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2018-02-12 11:05:12 +00:00
|
|
|
, attrs
|
2017-09-05 09:16:41 +00:00
|
|
|
, chardet
|
|
|
|
, multidict
|
|
|
|
, async-timeout
|
|
|
|
, yarl
|
2018-02-02 14:13:31 +00:00
|
|
|
, idna-ssl
|
2019-01-10 14:11:46 +00:00
|
|
|
, typing-extensions
|
|
|
|
, pytestrunner
|
2017-09-05 09:16:41 +00:00
|
|
|
, pytest
|
|
|
|
, gunicorn
|
2018-06-23 10:02:20 +00:00
|
|
|
, pytest-timeout
|
2019-01-10 14:11:46 +00:00
|
|
|
, async_generator
|
|
|
|
, pytest_xdist
|
|
|
|
, pytestcov
|
|
|
|
, pytest-mock
|
|
|
|
, trustme
|
|
|
|
, brotlipy
|
2019-10-17 08:45:15 +00:00
|
|
|
, freezegun
|
2017-09-05 09:16:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohttp";
|
2019-10-17 08:45:15 +00:00
|
|
|
version = "3.6.2";
|
2017-09-05 09:16:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-17 08:45:15 +00:00
|
|
|
sha256 = "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5";
|
2017-09-05 09:16:41 +00:00
|
|
|
};
|
|
|
|
|
2018-03-07 21:53:54 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2017-09-05 09:16:41 +00:00
|
|
|
|
2019-01-10 14:11:46 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestrunner pytest gunicorn pytest-timeout async_generator pytest_xdist
|
2019-10-17 08:45:15 +00:00
|
|
|
pytest-mock pytestcov trustme brotlipy freezegun
|
2019-01-10 14:11:46 +00:00
|
|
|
];
|
2017-09-05 09:16:41 +00:00
|
|
|
|
2018-02-12 11:05:12 +00:00
|
|
|
propagatedBuildInputs = [ attrs chardet multidict async-timeout yarl ]
|
2019-01-10 14:11:46 +00:00
|
|
|
++ lib.optionals (pythonOlder "3.7") [ idna-ssl typing-extensions ];
|
2018-06-23 10:02:20 +00:00
|
|
|
|
2019-10-17 08:45:15 +00:00
|
|
|
# disable tests which attempt to do loopback connections
|
2019-08-18 09:35:45 +00:00
|
|
|
checkPhase = ''
|
2019-10-17 08:45:15 +00:00
|
|
|
cd tests
|
|
|
|
pytest -k "not get_valid_log_format_exc \
|
|
|
|
and not test_access_logger_atoms \
|
|
|
|
and not aiohttp_request_coroutine \
|
|
|
|
and not server_close_keepalive_connection \
|
|
|
|
and not connector \
|
|
|
|
and not client_disconnect \
|
|
|
|
and not handle_keepalive_on_closed_connection \
|
|
|
|
and not partially_applied_handler \
|
|
|
|
and not middleware" \
|
|
|
|
--ignore=test_connector.py
|
2019-06-15 06:42:51 +00:00
|
|
|
'';
|
|
|
|
|
2018-02-02 14:13:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous HTTP Client/Server for Python and asyncio";
|
|
|
|
license = licenses.asl20;
|
2018-02-12 11:05:12 +00:00
|
|
|
homepage = https://github.com/aio-libs/aiohttp;
|
2018-02-02 14:13:31 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2017-09-05 09:16:41 +00:00
|
|
|
};
|
2018-01-23 16:30:09 +00:00
|
|
|
}
|