2022-03-10 19:12:11 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, requests, pytestCheckHook }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kiss-headers";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "2.3.1";
|
2022-03-10 19:12:11 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ousret";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-xPjw/uJTmvmQZDrI3i1KTUeAZuDF1mc13hvFBl8Erh0=";
|
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 = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--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 ];
|
|
|
|
};
|
|
|
|
}
|