at 23.11-beta 1.7 kB view raw
1{ lib 2, aiohttp 3, async-lru 4, buildPythonPackage 5, fetchFromGitHub 6, oauthlib 7, pytestCheckHook 8, pythonOlder 9, requests 10, requests-oauthlib 11, six 12, vcrpy 13}: 14 15buildPythonPackage rec { 16 pname = "tweepy"; 17 version = "4.14.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = pname; 24 repo = pname; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-ugqa85l0eWVtMUl5d+BjEWvTyH8c5NVtsnPflkHTWh8="; 27 }; 28 29 propagatedBuildInputs = [ 30 aiohttp 31 async-lru 32 oauthlib 33 requests 34 requests-oauthlib 35 six 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 vcrpy 41 ]; 42 43 pythonImportsCheck = [ 44 "tweepy" 45 ]; 46 47 # The checks with streaming fail due to (seemingly) not decoding (or unexpectedly sending response in) GZIP 48 # Same issue impacted mastodon-py, see https://github.com/halcy/Mastodon.py/commit/cd86887d88bbc07de462d1e00a8fbc3d956c0151 (who just disabled these) 49 disabledTestPaths = [ 50 "tests/test_client.py" 51 ]; 52 53 disabledTests = [ 54 "test_indicate_direct_message_typing" 55 "testcachedifferentqueryparameters" 56 "testcachedresult" 57 "testcreatedestroyblock" 58 "testcreatedestroyfriendship" 59 "testcreateupdatedestroylist" 60 "testgetfollowerids" 61 "testgetfollowers" 62 "testgetfriendids" 63 "testgetfriends" 64 "testgetuser" 65 "testcursorcursoritems" 66 "testcursorcursorpages" 67 "testcursornext" 68 ]; 69 70 meta = with lib; { 71 description = "Twitter library for Python"; 72 homepage = "https://github.com/tweepy/tweepy"; 73 changelog = "https://github.com/tweepy/tweepy/releases/tag/v${version}"; 74 license = licenses.mit; 75 maintainers = with maintainers; [ marius851000 ]; 76 }; 77}