2017-09-05 10:16:41 +01:00
|
|
|
{ lib
|
2020-02-17 23:52:55 +00:00
|
|
|
, stdenv
|
2017-09-05 10:16:41 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2021-02-27 12:05:52 +00:00
|
|
|
, async-timeout
|
2018-02-12 11:05:12 +00:00
|
|
|
, attrs
|
2017-09-05 10:16:41 +01:00
|
|
|
, chardet
|
2018-02-02 14:13:31 +00:00
|
|
|
, idna-ssl
|
2021-02-27 12:05:52 +00:00
|
|
|
, multidict
|
2019-01-10 14:11:46 +00:00
|
|
|
, typing-extensions
|
2021-02-27 12:05:52 +00:00
|
|
|
, yarl
|
2019-01-10 14:11:46 +00:00
|
|
|
, async_generator
|
|
|
|
, brotlipy
|
2019-10-17 09:45:15 +01:00
|
|
|
, freezegun
|
2021-02-27 12:05:52 +00:00
|
|
|
, gunicorn
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
2020-11-30 16:55:00 +00:00
|
|
|
, re-assert
|
2021-02-27 12:05:52 +00:00
|
|
|
, trustme
|
2017-09-05 10:16:41 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohttp";
|
2021-03-07 18:43:23 +00:00
|
|
|
version = "3.7.4.post0";
|
2021-02-27 12:05:52 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-07 18:43:23 +00:00
|
|
|
sha256 = "493d3299ebe5f5a7c66b9819eacdcfbbaaf1a8e84911ddffcdc48888497afecf";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2021-02-27 12:05:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace " --cov=aiohttp" ""
|
|
|
|
'';
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2020-11-30 16:55:00 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-02-27 12:05:52 +00:00
|
|
|
async-timeout
|
2020-11-30 16:55:00 +00:00
|
|
|
attrs
|
|
|
|
chardet
|
|
|
|
multidict
|
|
|
|
typing-extensions
|
|
|
|
yarl
|
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
idna-ssl
|
|
|
|
];
|
2018-06-23 11:02:20 +01:00
|
|
|
|
2021-02-27 12:05:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
async_generator
|
|
|
|
brotlipy
|
|
|
|
freezegun
|
|
|
|
gunicorn
|
|
|
|
pytest-mock
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
re-assert
|
|
|
|
trustme
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-n auto"
|
|
|
|
];
|
|
|
|
|
2020-06-11 07:24:40 +01:00
|
|
|
disabledTests = [
|
2021-02-27 12:05:52 +00:00
|
|
|
# Disable tests that require network access
|
2020-11-30 16:55:00 +00:00
|
|
|
"test_mark_formdata_as_processed"
|
2020-06-11 07:24:40 +01:00
|
|
|
] ++ lib.optionals stdenv.is32bit [
|
|
|
|
"test_cookiejar"
|
2020-06-16 05:23:23 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-02-27 12:05:52 +00:00
|
|
|
"test_addresses" # https://github.com/aio-libs/aiohttp/issues/3572, remove >= v4.0.0
|
2020-06-16 05:23:23 +01:00
|
|
|
"test_close"
|
2020-06-11 07:24:40 +01:00
|
|
|
];
|
|
|
|
|
2021-02-27 12:05:52 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-06-11 07:24:40 +01:00
|
|
|
# aiohttp in current folder shadows installed version
|
|
|
|
# Probably because we run `python -m pytest` instead of `pytest` in the hook.
|
|
|
|
preCheck = ''
|
2019-10-17 09:45:15 +01:00
|
|
|
cd tests
|
2019-06-15 07:42:51 +01:00
|
|
|
'';
|
|
|
|
|
2018-02-02 14:13:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous HTTP Client/Server for Python and asyncio";
|
|
|
|
license = licenses.asl20;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/aio-libs/aiohttp";
|
2018-02-02 14:13:31 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
2018-01-23 16:30:09 +00:00
|
|
|
}
|