1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, requests
5, requests-oauthlib
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "twitterapi";
11 version = "2.8.2";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "geduldig";
18 repo = "TwitterAPI";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-4Z8XfgRhQXawCvaXM+kyMO3fejvXIF2LgVdmfXDDqIA=";
21 };
22
23 propagatedBuildInputs = [
24 requests
25 requests-oauthlib
26 ];
27
28 # Tests are interacting with the Twitter API
29 doCheck = false;
30
31 pythonImportsCheck = [
32 "TwitterAPI"
33 ];
34
35 meta = with lib; {
36 description = "Python wrapper for Twitter's REST and Streaming APIs";
37 homepage = "https://github.com/geduldig/TwitterAPI";
38 changelog = "https://github.com/geduldig/TwitterAPI/blob/v${version}/CHANGE.log";
39 license = with licenses; [ mit ];
40 maintainers = with maintainers; [ fab ];
41 };
42}