1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, pytest-runner
6, future
7, requests
8, responses
9, requests_oauthlib
10, pytest
11, hypothesis
12}:
13
14buildPythonPackage rec {
15 pname = "python-twitter";
16 version = "3.5";
17
18 # No tests in PyPi Tarball
19 src = fetchFromGitHub {
20 owner = "bear";
21 repo = pname;
22 rev = "v${version}";
23 sha256 = "08ydmf6dcd416cvw6xq1wxsz6b9s21f2mf9fh3y4qz9swj6n9h8z";
24 };
25
26 patches = [
27 # Fix tests. Remove with the next release
28 (fetchpatch {
29 url = "https://github.com/bear/python-twitter/commit/f7eb83d9dca3ba0ee93e629ba5322732f99a3a30.patch";
30 sha256 = "008b1bd03wwngs554qb136lsasihql3yi7vlcacmk4s5fmr6klqw";
31 })
32 ];
33
34 nativeBuildInputs = [ pytest-runner ];
35 propagatedBuildInputs = [ future requests requests_oauthlib ];
36 checkInputs = [ pytest responses hypothesis ];
37
38 meta = with lib; {
39 description = "A Python wrapper around the Twitter API";
40 homepage = "https://github.com/bear/python-twitter";
41 license = licenses.asl20;
42 maintainers = [ maintainers.marsam ];
43 };
44}