nixpkgs/pkgs/development/python-modules/simple-rest-client/default.nix
Martin Weinelt 0215034f25 python3.pkgs: Migrate fetchers to use hash
when they already rely on SRI hashes.
2023-03-03 23:59:29 +01:00

63 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.3";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "allisson";
repo = "python-simple-rest-client";
rev = version;
hash = "sha256-HdGYLDrqQvd7hvjwhC5dY2amdHUZHTYJvD1QP89lcXU=";
};
propagatedBuildInputs = [
httpx
python-slugify
python-status
];
nativeCheckInputs = [
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 ];
};
}