depot/third_party/nixpkgs/pkgs/development/python-modules/kiss-headers/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

48 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
requests,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "kiss-headers";
version = "2.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "Ousret";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-WeAzlC1yT+0nPSuB278z8T0XvPjbre051f/Rva5ujAk=";
};
nativeBuildInputs = [ hatchling ];
propagatedBuildInputs = [ requests ];
nativeCheckInputs = [ pytestCheckHook ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "--cov=kiss_headers --doctest-modules --cov-report=term-missing -rxXs" "--doctest-modules -rxXs"
'';
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;
maintainers = with maintainers; [ wolfangaukang ];
};
}