2021-09-23 15:35:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-httpserver
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-slugify
|
|
|
|
, python-status
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "simple-rest-client";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "1.1.2";
|
|
|
|
format = "setuptools";
|
2021-09-23 15:35:13 +00:00
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-09-23 15:35:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "allisson";
|
|
|
|
repo = "python-simple-rest-client";
|
|
|
|
rev = version;
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-kyoFtPa94c5EAT7wBEXdkPEg8Bp3hJQQoFsutap1qvs=";
|
2021-09-23 15:35:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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" ""
|
2021-10-14 00:43:12 +00:00
|
|
|
substituteInPlace requirements-dev.txt \
|
|
|
|
--replace "asyncmock" ""
|
2021-09-23 15:35:13 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_decorators.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"simple_rest_client"
|
|
|
|
];
|
2021-09-23 15:35:13 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|