depot/third_party/nixpkgs/pkgs/development/python-modules/simple-rest-client/default.nix
Default email 6064764516 Project import generated by Copybara.
GitOrigin-RevId: 2cf9db0e3d45b9d00f16f2836cb1297bcadc475e
2021-10-14 08:43:12 +08:00

61 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, pytest-asyncio
, pytest-httpserver
, pytestCheckHook
, python-slugify
, python-status
, pythonOlder
}:
buildPythonPackage rec {
pname = "simple-rest-client";
version = "1.1.0";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "allisson";
repo = "python-simple-rest-client";
rev = version;
sha256 = "sha256-i+wUc9qxyei+Jbch8vyIrm9ElClnOIKp+YK6jIDkbTA=";
};
propagatedBuildInputs = [
httpx
python-slugify
python-status
];
checkInputs = [
pytest-asyncio
pytest-httpserver
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
substituteInPlace pytest.ini \
--replace " --cov=simple_rest_client --cov-report=term-missing" ""
substituteInPlace requirements-dev.txt \
--replace "asyncmock" ""
'';
disabledTestPaths = [
"tests/test_decorators.py"
];
pythonImportsCheck = [
"simple_rest_client"
];
meta = with lib; {
description = "Simple REST client for Python";
homepage = "https://github.com/allisson/python-simple-rest-client";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}