2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, chardet
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, semver
|
2021-03-20 04:20:00 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytestcov
|
|
|
|
, pytestrunner
|
|
|
|
, openapi-spec-validator
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "prance";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "0.20.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "4ffcddae6218cf6753a02af36ca9fb1c92eec4689441789ee2e9963230882388";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pytestrunner
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
chardet
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
semver
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-03-20 04:20:00 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
pytestcov
|
|
|
|
openapi-spec-validator
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-03-20 04:20:00 +00:00
|
|
|
--replace "tests_require = dev_require," "tests_require = None," \
|
|
|
|
--replace "chardet~=4.0" "" \
|
|
|
|
--replace "semver~=2.13" ""
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov-fail-under=90" ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
# Disable tests that require network
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_convert.py"
|
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
"test_fetch_url_http"
|
|
|
|
];
|
|
|
|
pythonImportsCheck = [ "prance" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";
|
|
|
|
homepage = "https://github.com/jfinkhaeuser/prance";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|