1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 httpx, 6 pytest-asyncio, 7 pytest-httpserver, 8 pytestCheckHook, 9 python-slugify, 10 python-status, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "simple-rest-client"; 16 version = "1.2.1"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "allisson"; 23 repo = "python-simple-rest-client"; 24 rev = version; 25 hash = "sha256-IaLo7nBMIabi4ZjZ4ZLJliCL/dzidaCBCmn0cq7Fzdw="; 26 }; 27 28 propagatedBuildInputs = [ 29 httpx 30 python-slugify 31 python-status 32 ]; 33 34 nativeCheckInputs = [ 35 pytest-asyncio 36 pytest-httpserver 37 pytestCheckHook 38 ]; 39 40 postPatch = '' 41 substituteInPlace setup.py \ 42 --replace "pytest-runner" "" 43 substituteInPlace pytest.ini \ 44 --replace " --cov=simple_rest_client --cov-report=term-missing" "" 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}