ch9344: 2.0 -> 0-unstable-2024-11-15 (#354536)
[NixPkgs.git] / pkgs / development / python-modules / simple-rest-client / default.nix
blob023b604c8a57ae9b1f739a28f5caa611ae067577
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   httpx,
6   pytest-asyncio,
7   pytest-httpserver,
8   pytestCheckHook,
9   python-slugify,
10   python-status,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "simple-rest-client";
16   version = "1.2.1";
17   format = "setuptools";
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "allisson";
23     repo = "python-simple-rest-client";
24     rev = version;
25     hash = "sha256-IaLo7nBMIabi4ZjZ4ZLJliCL/dzidaCBCmn0cq7Fzdw=";
26   };
28   propagatedBuildInputs = [
29     httpx
30     python-slugify
31     python-status
32   ];
34   nativeCheckInputs = [
35     pytest-asyncio
36     pytest-httpserver
37     pytestCheckHook
38   ];
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   '';
49   disabledTestPaths = [ "tests/test_decorators.py" ];
51   pythonImportsCheck = [ "simple_rest_client" ];
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   };