From eda0545f6a7999321830427d0fc9d4bf7bdb3258 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 1 Nov 2023 19:15:39 +0100 Subject: [PATCH] python311Packages.mastodon-py: unstable-2023-06-24 -> 1.8.1 https://github.com/halcy/Mastodon.py/blob/1.8.1/CHANGELOG.rst --- .../python-modules/mastodon-py/default.nix | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/mastodon-py/default.nix b/pkgs/development/python-modules/mastodon-py/default.nix index 59119e0b8a97..5034346b9cfe 100644 --- a/pkgs/development/python-modules/mastodon-py/default.nix +++ b/pkgs/development/python-modules/mastodon-py/default.nix @@ -7,7 +7,6 @@ , http-ece , python-dateutil , python-magic -, pytz , requests , six , pytestCheckHook @@ -15,42 +14,60 @@ , pytest-vcr , requests-mock , setuptools -, pytest-cov }: buildPythonPackage rec { pname = "mastodon-py"; - # tests are broken on last release, check after next release (> 1.8.1) - version = "unstable-2023-06-24"; - - format = "pyproject"; + version = "1.8.1"; + pyproject = true; src = fetchFromGitHub { owner = "halcy"; repo = "Mastodon.py"; - rev = "cd86887d88bbc07de462d1e00a8fbc3d956c0151"; - hash = "sha256-rJocFvtBPrSSny3lwENuRsQdAzi3u8b+SfDNGloniWI="; + rev = "refs/tags/${version}"; + hash = "sha256-r0AAUjd2MBfZANEpyztMNyaQTlGWvWoUVjJNO1eL218="; }; + postPatch = '' + sed -i '/addopts/d' setup.cfg + ''; + + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ blurhash - cryptography decorator - http-ece python-dateutil python-magic - pytz requests six ]; + passthru.optional-dependencies = { + blurhash = [ + blurhash + ]; + webpush = [ + http-ece + cryptography + ]; + }; + nativeCheckInputs = [ pytestCheckHook pytest-mock pytest-vcr - pytest-cov requests-mock setuptools + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + disabledTests = [ + "test_notifications_dismiss_pre_2_9_2" + "test_status_card_pre_2_9_2" + "test_stream_user_direct" + "test_stream_user_local" ]; pythonImportsCheck = [ "mastodon" ];