diff --git a/pkgs/development/python-modules/aiofile/default.nix b/pkgs/development/python-modules/aiofile/default.nix new file mode 100644 index 000000000000..ec09473e2072 --- /dev/null +++ b/pkgs/development/python-modules/aiofile/default.nix @@ -0,0 +1,45 @@ +{ lib +, aiomisc +, asynctest +, caio +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiofile"; + version = "3.8.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mosquito"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-PIImQZ1ymazsOg8qmlO91tNYHwXqK/d8AuKPsWYvh0w="; + }; + + propagatedBuildInputs = [ + caio + ]; + + checkInputs = [ + aiomisc + asynctest + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aiofile" + ]; + + meta = with lib; { + description = "File operations with asyncio support"; + homepage = "https://github.com/mosquito/aiofile"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aiomisc/default.nix b/pkgs/development/python-modules/aiomisc/default.nix new file mode 100644 index 000000000000..d1fd33eb618e --- /dev/null +++ b/pkgs/development/python-modules/aiomisc/default.nix @@ -0,0 +1,88 @@ +{ lib +, aiocontextvars + #, aiocarbon +, aiohttp + #, aiohttp-asgi +, async-timeout +, buildPythonPackage +, colorlog +, croniter +, fastapi +, fetchFromGitHub +, logging-journald +, pytestCheckHook +, pythonOlder +, raven + #, raven-aiohttp +, setproctitle +, uvloop +}: + +buildPythonPackage rec { + pname = "aiomisc"; + version = "16.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "aiokitchen"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-wxm7MrFHZ7TrUGw5w7iLWs1olU8ZmJmJ7M/BZ6Nf0fU="; + }; + + propagatedBuildInputs = [ + colorlog + logging-journald + ]; + + checkInputs = [ + aiocontextvars + async-timeout + fastapi + pytestCheckHook + raven + setproctitle + ] ++ passthru.optional-dependencies.aiohttp + ++ passthru.optional-dependencies.cron + ++ passthru.optional-dependencies.uvloop; + + passthru.optional-dependencies = { + aiohttp = [ + aiohttp + ]; + #asgi = [ + # aiohttp-asgi + #]; + cron = [ + croniter + ]; + #carbon = [ + # aiocarbon + #]; + #raven = [ + # raven-aiohttp + #]; + uvloop = [ + uvloop + ]; + }; + + pythonImportsCheck = [ + "aiomisc" + ]; + + disabledTestPaths = [ + # Dependencies are not available at the moment + "tests/test_entrypoint.py" + "tests/test_raven_service.py" + ]; + + meta = with lib; { + description = "Miscellaneous utils for asyncio"; + homepage = "https://github.com/aiokitchen/aiomisc"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/caio/default.nix b/pkgs/development/python-modules/caio/default.nix new file mode 100644 index 000000000000..28ba5a2f4d19 --- /dev/null +++ b/pkgs/development/python-modules/caio/default.nix @@ -0,0 +1,38 @@ +{ lib +, aiomisc +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "caio"; + version = "0.9.8"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mosquito"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-hUG5EaraoKj3D3K+Qm2Nm1AFe19qwRy/FnEb1SXWKDM="; + }; + + checkInputs = [ + aiomisc + pytestCheckHook + ]; + + pythonImportsCheck = [ + "caio" + ]; + + meta = with lib; { + description = "File operations with asyncio support"; + homepage = "https://github.com/mosquito/caio"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/logging-journald/default.nix b/pkgs/development/python-modules/logging-journald/default.nix new file mode 100644 index 000000000000..6abd9efeda27 --- /dev/null +++ b/pkgs/development/python-modules/logging-journald/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +}: + +buildPythonPackage rec { + pname = "logging-journald"; + version = "0.6.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-U6kqAvMSyLDbThc6wAN/ri0vmt/vAxgFFZT65Csbpss="; + }; + + # Circular dependency with aiomisc + doCheck = false; + + pythonImportsCheck = [ + "logging_journald" + ]; + + meta = with lib; { + description = "Logging handler for writing logs to the journald"; + homepage = "https://github.com/mosquito/logging-journald"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b25cd878852e..92ee65e06e0d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -306,6 +306,8 @@ in { aioextensions = callPackage ../development/python-modules/aioextensions { }; + aiofile = callPackage ../development/python-modules/aiofile { }; + aiofiles = callPackage ../development/python-modules/aiofiles { }; aioflo = callPackage ../development/python-modules/aioflo { }; @@ -374,6 +376,8 @@ in { aiolyric = callPackage ../development/python-modules/aiolyric { }; + aiomisc = callPackage ../development/python-modules/aiomisc { }; + aiomodernforms = callPackage ../development/python-modules/aiomodernforms { }; aiomultiprocess = callPackage ../development/python-modules/aiomultiprocess { }; @@ -1599,6 +1603,8 @@ in { inherit (self) python numpy boost; }); + caio = callPackage ../development/python-modules/caio { }; + cairo-lang = callPackage ../development/python-modules/cairo-lang { }; cairocffi = callPackage ../development/python-modules/cairocffi { }; @@ -5371,6 +5377,8 @@ in { logfury = callPackage ../development/python-modules/logfury { }; + logging-journald = callPackage ../development/python-modules/logging-journald { }; + logi-circle = callPackage ../development/python-modules/logi-circle { }; logical-unification = callPackage ../development/python-modules/logical-unification { };