1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-21 17:01:10 +03:00
nixpkgs/pkgs/development/python-modules/aiohttp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

107 lines
2.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
# install_requires
, attrs
, charset-normalizer
, multidict
, async-timeout
, yarl
, frozenlist
, aiosignal
, aiodns
, brotli
, cchardet
, asynctest
, typing-extensions
, idna-ssl
# tests_require
2019-01-10 15:11:46 +01:00
, async_generator
, freezegun
, gunicorn
, pytest-mock
, pytestCheckHook
2020-11-30 17:55:00 +01:00
, re-assert
, trustme
}:
buildPythonPackage rec {
pname = "aiohttp";
version = "3.8.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "fc5471e1a54de15ef71c1bc6ebe80d4dc681ea600e68bfd1cbce40427f0b7578";
};
postPatch = ''
sed -i '/--cov/d' setup.cfg
'';
2020-11-30 17:55:00 +01:00
propagatedBuildInputs = [
attrs
charset-normalizer
2020-11-30 17:55:00 +01:00
multidict
async-timeout
2020-11-30 17:55:00 +01:00
yarl
typing-extensions
frozenlist
aiosignal
aiodns
brotli
cchardet
] ++ lib.optionals (pythonOlder "3.8") [
asynctest
typing-extensions
2020-11-30 17:55:00 +01:00
] ++ lib.optionals (pythonOlder "3.7") [
idna-ssl
];
2018-06-23 12:02:20 +02:00
checkInputs = [
async_generator
freezegun
gunicorn
pytest-mock
pytestCheckHook
re-assert
trustme
];
disabledTests = [
# Disable tests that require network access
"test_client_session_timeout_zero"
2020-11-30 17:55:00 +01:00
"test_mark_formdata_as_processed"
"test_requote_redirect_url_default"
] ++ 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"
];
disabledTestPaths = [
"test_proxy_functional.py" # FIXME package proxy.py
];
__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
'' + lib.optionalString stdenv.isDarwin ''
# Work around "OSError: AF_UNIX path too long"
export TMPDIR="/tmp"
'';
2019-06-15 08:42:51 +02: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 ];
};
}