1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, requests
5, requests-oauthlib
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "twitterapi";
11 version = "2.8.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "geduldig";
18 repo = "TwitterAPI";
19 rev = "v${version}";
20 hash = "sha256-aBL7k10kZNQG/wNIxO37TbDSlbhrVjTfv2aXcrS2Ibo=";
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 license = with licenses; [ mit ];
39 maintainers = with maintainers; [ fab ];
40 };
41}