Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / simple-rest-client / default.nix
blob325454c30ea7199f401e706dafa45f37f17066f4
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , httpx
5 , pytest-asyncio
6 , pytest-httpserver
7 , pytestCheckHook
8 , python-slugify
9 , python-status
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "simple-rest-client";
15   version = "1.2.1";
16   format = "setuptools";
18   disabled = pythonOlder "3.8";
20   src = fetchFromGitHub {
21     owner = "allisson";
22     repo = "python-simple-rest-client";
23     rev = version;
24     hash = "sha256-IaLo7nBMIabi4ZjZ4ZLJliCL/dzidaCBCmn0cq7Fzdw=";
25   };
27   propagatedBuildInputs = [
28     httpx
29     python-slugify
30     python-status
31   ];
33   nativeCheckInputs = [
34     pytest-asyncio
35     pytest-httpserver
36     pytestCheckHook
37   ];
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   '';
48   disabledTestPaths = [
49     "tests/test_decorators.py"
50   ];
52   pythonImportsCheck = [
53     "simple_rest_client"
54   ];
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   };