3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/aiohttp/default.nix

90 lines
1.7 KiB
Nix
Raw Normal View History

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