1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpx,
6 pytest-asyncio,
7 pytest-cov-stub,
8 pytest-httpserver,
9 pytestCheckHook,
10 python-slugify,
11 python-status,
12 pythonOlder,
13}:
14
15buildPythonPackage rec {
16 pname = "simple-rest-client";
17 version = "1.2.1";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "allisson";
24 repo = "python-simple-rest-client";
25 rev = version;
26 hash = "sha256-IaLo7nBMIabi4ZjZ4ZLJliCL/dzidaCBCmn0cq7Fzdw=";
27 };
28
29 propagatedBuildInputs = [
30 httpx
31 python-slugify
32 python-status
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytest-cov-stub
38 pytest-httpserver
39 pytestCheckHook
40 ];
41
42 postPatch = ''
43 substituteInPlace setup.py \
44 --replace "pytest-runner" ""
45 substituteInPlace requirements-dev.txt \
46 --replace "asyncmock" ""
47 '';
48
49 disabledTestPaths = [ "tests/test_decorators.py" ];
50
51 pythonImportsCheck = [ "simple_rest_client" ];
52
53 meta = with lib; {
54 description = "Simple REST client for Python";
55 homepage = "https://github.com/allisson/python-simple-rest-client";
56 license = with licenses; [ mit ];
57 maintainers = with maintainers; [ fab ];
58 };
59}