1{ lib
2, betamax
3, betamax-matchers
4, betamax-serializers
5, buildPythonPackage
6, fetchFromGitHub
7, mock
8, prawcore
9, pytestCheckHook
10, pythonOlder
11, requests-toolbelt
12, update_checker
13, websocket-client
14}:
15
16buildPythonPackage rec {
17 pname = "praw";
18 version = "7.7.1";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "praw-dev";
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 hash = "sha256-L7wTHD/ypXVc8GMfl9u16VNb9caLJoXpaMEIzaVVUgo=";
28 };
29
30 propagatedBuildInputs = [
31 mock
32 prawcore
33 update_checker
34 websocket-client
35 ];
36
37 nativeCheckInputs = [
38 betamax
39 betamax-serializers
40 betamax-matchers
41 pytestCheckHook
42 requests-toolbelt
43 ];
44
45 disabledTestPaths = [
46 # tests requiring network
47 "tests/integration"
48 ];
49
50 pythonImportsCheck = [
51 "praw"
52 ];
53
54 meta = with lib; {
55 description = "Python Reddit API wrapper";
56 homepage = "https://praw.readthedocs.org/";
57 changelog = "https://github.com/praw-dev/praw/blob/v${version}/CHANGES.rst";
58 license = licenses.bsd2;
59 maintainers = with maintainers; [ fab ];
60 };
61}