2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
requests,
|
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kiss-headers";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.4.3";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ousret";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-WeAzlC1yT+0nPSuB278z8T0XvPjbre051f/Rva5ujAk=";
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "--cov=kiss_headers --doctest-modules --cov-report=term-missing -rxXs" "--doctest-modules -rxXs"
|
2022-03-10 19:12:11 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require internet access
|
|
|
|
"kiss_headers/__init__.py"
|
|
|
|
"tests/test_serializer.py"
|
|
|
|
"tests/test_with_http_request.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "kiss_headers" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package for HTTP/1.1 style headers";
|
|
|
|
homepage = "https://github.com/Ousret/kiss-headers";
|
|
|
|
license = licenses.mit;
|
2024-06-24 18:47:55 +00:00
|
|
|
maintainers = [ ];
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
}
|