Unverified Commit 054da5f2 authored by Amadej Kastelic's avatar Amadej Kastelic
Browse files
parent f7b8f1b4
Loading
Loading
Loading
Loading
+66 −0
Original line number Diff line number Diff line
{
  lib,
  aiohttp,
  buildPythonPackage,
  fetchFromGitHub,
  flit-core,
  mock,
  pytestCheckHook,
  pytest-asyncio,
  pytest-vcr,
  pythonOlder,
  requests,
  requests-toolbelt,
  testfixtures,
  vcrpy,
  yarl,
}:

buildPythonPackage rec {
  pname = "asyncprawcore";
  version = "2.4.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "praw-dev";
    repo = "asyncprawcore";
    tag = "v${version}";
    hash = "sha256-FDQdtnNjsbiEp9BUYdQFMC/hkyJDhCh2WHhQWSQwrFY=";
  };

  nativeBuildInputs = [ flit-core ];

  propagatedBuildInputs = [
    requests
    aiohttp
    yarl
  ];

  nativeCheckInputs = [
    testfixtures
    mock
    requests-toolbelt
    pytestCheckHook
    pytest-asyncio
    pytest-vcr
    vcrpy
  ];

  disabledTestPaths = [
    # Ignored due to error with request cannot pickle 'BufferedReader' instances
    # Upstream issue: https://github.com/kevin1024/vcrpy/issues/737
    "tests/integration/test_sessions.py"
  ];

  pythonImportsCheck = [ "asyncprawcore" ];

  meta = {
    description = "Low-level asynchronous communication layer for Async PRAW";
    homepage = "https://asyncpraw.readthedocs.io/";
    changelog = "https://github.com/praw-dev/asyncprawcore/blob/v${version}/CHANGES.rst";
    license = lib.licenses.bsd2;
    maintainers = [ lib.maintainers.amadejkastelic ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -1020,6 +1020,8 @@ self: super: with self; {
  asyncpg = callPackage ../development/python-modules/asyncpg { };
  asyncprawcore = callPackage ../development/python-modules/asyncprawcore { };
  asyncserial = callPackage ../development/python-modules/asyncserial { };
  asyncsleepiq = callPackage ../development/python-modules/asyncsleepiq { };