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