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