diff --git a/pkgs/development/python-modules/aiomisc-pytest/default.nix b/pkgs/development/python-modules/aiomisc-pytest/default.nix index 7fe99ede807d..d7b8b4c7fe6d 100644 --- a/pkgs/development/python-modules/aiomisc-pytest/default.nix +++ b/pkgs/development/python-modules/aiomisc-pytest/default.nix @@ -3,25 +3,25 @@ aiomisc, buildPythonPackage, fetchPypi, - poetry-core, + hatchling, pytest, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "aiomisc-pytest"; - version = "1.3.4"; + version = "2.0.0"; pyproject = true; src = fetchPypi { pname = "aiomisc_pytest"; - inherit version; - hash = "sha256-9Of1pSUcMiIhkz7OW5erF4oDlf/ABkaamDBPg7+WbBE="; + inherit (finalAttrs) version; + hash = "sha256-cbYrkO6YRSPFfhjgdXzuVA2wY5RyEmWcG+myGZu1TGU="; }; - build-system = [ poetry-core ]; - pythonRelaxDeps = [ "pytest" ]; + build-system = [ hatchling ]; + buildInputs = [ pytest ]; dependencies = [ aiomisc ]; @@ -37,4 +37,4 @@ buildPythonPackage rec { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ fab ]; }; -} +}) diff --git a/pkgs/development/python-modules/aiomisc/default.nix b/pkgs/development/python-modules/aiomisc/default.nix index 93afe50e7fcd..7674a8eba6c3 100644 --- a/pkgs/development/python-modules/aiomisc/default.nix +++ b/pkgs/development/python-modules/aiomisc/default.nix @@ -3,6 +3,7 @@ stdenv, aiocontextvars, aiohttp, + aiothreads, async-timeout, buildPythonPackage, colorlog, @@ -21,12 +22,12 @@ buildPythonPackage (finalAttrs: { pname = "aiomisc"; - version = "17.10.3"; + version = "18.0.26"; pyproject = true; src = fetchPypi { inherit (finalAttrs) pname version; - hash = "sha256-24ka982Wx4Bk2TlWuw6pvfRLh47l8QJvHD+sc+LOxVY="; + hash = "sha256-wsTl43LQHMyHSMKlZzCV5KmcdUMJQA51ZljBuLMiUTg="; }; build-system = [ @@ -35,6 +36,7 @@ buildPythonPackage (finalAttrs: { ]; dependencies = [ + aiothreads colorlog ] ++ lib.optionals stdenv.hostPlatform.isLinux [ logging-journald ]; diff --git a/pkgs/development/python-modules/aiothreads/default.nix b/pkgs/development/python-modules/aiothreads/default.nix new file mode 100644 index 000000000000..c3ab811f4adb --- /dev/null +++ b/pkgs/development/python-modules/aiothreads/default.nix @@ -0,0 +1,50 @@ +{ + lib, + async-timeout, + buildPythonPackage, + fetchFromGitHub, + hatchling, + nix-update-script, + pyprojectVersionPatchHook, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "aiothreads"; + version = "1.1.1"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "mosquito"; + repo = "aiothreads"; + tag = finalAttrs.version; + hash = "sha256-dK9aDfrIfoFbqq2mvzysy3xAyE/Qhs6cbTmxGzc72hU="; + }; + + build-system = [ hatchling ]; + + nativeBuildInputs = [ pyprojectVersionPatchHook ]; + + nativeCheckInputs = [ + async-timeout + pytest-asyncio + pytest-cov-stub + pytestCheckHook + ]; + + pythonImportsCheck = [ "aiothreads" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Module to bridge async and thread"; + homepage = "https://github.com/mosquito/aiothreads"; + changelog = "https://github.com/mosquito/aiothreads/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 661984726c97..23dc7623b151 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -582,6 +582,8 @@ self: super: with self; { aiotedee = callPackage ../development/python-modules/aiotedee { }; + aiothreads = callPackage ../development/python-modules/aiothreads { }; + aiotools = callPackage ../development/python-modules/aiotools { }; aiotractive = callPackage ../development/python-modules/aiotractive { };