diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix new file mode 100644 index 00000000000..30821986539 --- /dev/null +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder +, pytestrunner +, typing-extensions +, wrapt +, aioitertools +, aiohttp +, botocore +}: + +buildPythonPackage rec { + pname = "aiobotocore"; + version = "1.1.2"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "1fn9hgcg3qr9f7srjxc21bzkiix4al9308531slwlm99r0x3xcjl"; + }; + + # relax version constraints: aiobotocore works with newer botocore versions + # the pinning used to match some `extras_require` we're not using. + preConfigure = '' + substituteInPlace setup.py --replace 'botocore>=1.17.44,<1.17.45' 'botocore' + ''; + + propagatedBuildInputs = [ wrapt aiohttp aioitertools botocore ]; + + # tests not distributed on pypi + doCheck = false; + pythonImportsCheck = [ "aiobotocore" ]; + + meta = with lib; { + description = "Async client for amazon services using botocore and aiohttp/asyncio."; + license = licenses.asl20; + homepage = "https://github.com/aio-libs/aiobotocore"; + maintainers = with maintainers; [ teh ]; + }; +} diff --git a/pkgs/development/python-modules/aioitertools/default.nix b/pkgs/development/python-modules/aioitertools/default.nix new file mode 100644 index 00000000000..1c5ce1e2fae --- /dev/null +++ b/pkgs/development/python-modules/aioitertools/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder +, typing-extensions +, coverage +, python +, toml +}: + +buildPythonPackage rec { + pname = "aioitertools"; + version = "0.7.1"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "18ql6k2j1839jf2rmmmm29v6fb7mr59l75z8nlf0sadmydy6r9al"; + }; + + propagatedBuildInputs = [ typing-extensions ]; + checkInputs = [ coverage toml ]; + + checkPhase = '' + ${python.interpreter} -m coverage run -m aioitertools.tests + ''; + + meta = with lib; { + description = "Implementation of itertools, builtins, and more for AsyncIO and mixed-type iterables."; + license = licenses.mit; + homepage = "https://pypi.org/project/aioitertools/"; + maintainers = with maintainers; [ teh ]; + }; +} diff --git a/pkgs/development/python-modules/s3fs/default.nix b/pkgs/development/python-modules/s3fs/default.nix index 9c900610e03..739b32ec70d 100644 --- a/pkgs/development/python-modules/s3fs/default.nix +++ b/pkgs/development/python-modules/s3fs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, docutils, boto3, fsspec }: +{ stdenv, buildPythonPackage, fetchPypi, docutils, aiobotocore, fsspec }: buildPythonPackage rec { pname = "s3fs"; @@ -10,7 +10,7 @@ buildPythonPackage rec { }; buildInputs = [ docutils ]; - propagatedBuildInputs = [ boto3 fsspec ]; + propagatedBuildInputs = [ aiobotocore fsspec ]; # Depends on `moto` which has a long dependency chain with exact # version requirements that can't be made to work with current diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cb5d8e784e9..57458230bb1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -221,6 +221,10 @@ in { aiohttp-swagger = callPackage ../development/python-modules/aiohttp-swagger { }; + aioitertools = callPackage ../development/python-modules/aioitertools { }; + + aiobotocore = callPackage ../development/python-modules/aiobotocore { }; + aiohue = callPackage ../development/python-modules/aiohue { }; aioimaplib = callPackage ../development/python-modules/aioimaplib { };