2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
async-lru,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
oauthlib,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-oauthlib,
|
|
|
|
six,
|
|
|
|
vcrpy,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tweepy";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "4.14.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-ugqa85l0eWVtMUl5d+BjEWvTyH8c5NVtsnPflkHTWh8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-06-16 17:23:12 +00:00
|
|
|
async-lru
|
2021-12-06 16:07:01 +00:00
|
|
|
oauthlib
|
|
|
|
requests
|
2022-04-27 09:35:20 +00:00
|
|
|
requests-oauthlib
|
2022-07-14 12:49:19 +00:00
|
|
|
six
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "tweepy" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# The checks with streaming fail due to (seemingly) not decoding (or unexpectedly sending response in) GZIP
|
|
|
|
# Same issue impacted mastodon-py, see https://github.com/halcy/Mastodon.py/commit/cd86887d88bbc07de462d1e00a8fbc3d956c0151 (who just disabled these)
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = [ "tests/test_client.py" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_indicate_direct_message_typing"
|
|
|
|
"testcachedifferentqueryparameters"
|
|
|
|
"testcachedresult"
|
|
|
|
"testcreatedestroyblock"
|
|
|
|
"testcreatedestroyfriendship"
|
|
|
|
"testcreateupdatedestroylist"
|
|
|
|
"testgetfollowerids"
|
|
|
|
"testgetfollowers"
|
|
|
|
"testgetfriendids"
|
|
|
|
"testgetfriends"
|
|
|
|
"testgetuser"
|
|
|
|
"testcursorcursoritems"
|
|
|
|
"testcursorcursorpages"
|
|
|
|
"testcursornext"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Twitter library for Python";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/tweepy/tweepy";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/tweepy/tweepy/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ marius851000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|