1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 flit-core,
7 mock,
8 pytestCheckHook,
9 pytest-asyncio_0,
10 pytest-vcr,
11 requests,
12 requests-toolbelt,
13 testfixtures,
14 vcrpy,
15 yarl,
16}:
17
18buildPythonPackage rec {
19 pname = "asyncprawcore";
20 version = "2.4.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "praw-dev";
25 repo = "asyncprawcore";
26 tag = "v${version}";
27 hash = "sha256-FDQdtnNjsbiEp9BUYdQFMC/hkyJDhCh2WHhQWSQwrFY=";
28 };
29
30 build-system = [ flit-core ];
31
32 dependencies = [
33 requests
34 aiohttp
35 yarl
36 ];
37
38 nativeCheckInputs = [
39 testfixtures
40 mock
41 requests-toolbelt
42 pytestCheckHook
43 pytest-asyncio_0
44 pytest-vcr
45 vcrpy
46 ];
47
48 disabledTestPaths = [
49 # Ignored due to error with request cannot pickle 'BufferedReader' instances
50 # Upstream issue: https://github.com/kevin1024/vcrpy/issues/737
51 "tests/integration/test_sessions.py"
52 ];
53
54 pythonImportsCheck = [ "asyncprawcore" ];
55
56 meta = {
57 description = "Low-level asynchronous communication layer for Async PRAW";
58 homepage = "https://asyncpraw.readthedocs.io/";
59 changelog = "https://github.com/praw-dev/asyncprawcore/blob/v${version}/CHANGES.rst";
60 license = lib.licenses.bsd2;
61 maintainers = [ lib.maintainers.amadejkastelic ];
62 };
63}