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.1.1";
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "allisson";
21 repo = "python-simple-rest-client";
22 rev = version;
23 sha256 = "sha256-oJXP2/lChlzzKyNiTgJMHkcNkFyy92kTPxgDkon54g8=";
24 };
25
26 propagatedBuildInputs = [
27 httpx
28 python-slugify
29 python-status
30 ];
31
32 checkInputs = [
33 pytest-asyncio
34 pytest-httpserver
35 pytestCheckHook
36 ];
37
38 postPatch = ''
39 substituteInPlace setup.py \
40 --replace "pytest-runner" ""
41 substituteInPlace pytest.ini \
42 --replace " --cov=simple_rest_client --cov-report=term-missing" ""
43 substituteInPlace requirements-dev.txt \
44 --replace "asyncmock" ""
45 '';
46
47 disabledTestPaths = [
48 "tests/test_decorators.py"
49 ];
50
51 pythonImportsCheck = [
52 "simple_rest_client"
53 ];
54
55 meta = with lib; {
56 description = "Simple REST client for Python";
57 homepage = "https://github.com/allisson/python-simple-rest-client";
58 license = with licenses; [ mit ];
59 maintainers = with maintainers; [ fab ];
60 };
61}