2019-07-19 00:00:44 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-26 20:32:41 +01:00
|
|
|
, fetchFromGitHub
|
2019-07-19 00:00:44 +01:00
|
|
|
, chardet
|
|
|
|
, requests
|
2021-08-26 20:32:41 +01:00
|
|
|
, ruamel_yaml
|
2019-07-19 00:00:44 +01:00
|
|
|
, six
|
|
|
|
, semver
|
2021-03-24 15:11:11 +00:00
|
|
|
, pytestCheckHook
|
2019-07-19 00:00:44 +01:00
|
|
|
, openapi-spec-validator
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "prance";
|
2021-08-26 20:32:41 +01:00
|
|
|
version = "0.21.8.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RonnyPfannschmidt";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
sha256 = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ=";
|
2019-07-19 00:00:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
chardet
|
|
|
|
requests
|
2021-08-26 20:32:41 +01:00
|
|
|
ruamel_yaml
|
2019-07-19 00:00:44 +01:00
|
|
|
six
|
|
|
|
semver
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-03-24 15:11:11 +00:00
|
|
|
pytestCheckHook
|
2019-07-19 00:00:44 +01:00
|
|
|
openapi-spec-validator
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-03-24 15:11:11 +00:00
|
|
|
substituteInPlace setup.cfg \
|
2021-08-26 20:32:41 +01:00
|
|
|
--replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" ""
|
2019-07-19 00:00:44 +01:00
|
|
|
'';
|
|
|
|
|
2021-03-24 15:11:11 +00:00
|
|
|
# Disable tests that require network
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_convert.py"
|
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
"test_fetch_url_http"
|
|
|
|
];
|
|
|
|
pythonImportsCheck = [ "prance" ];
|
2019-07-19 00:00:44 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/jfinkhaeuser/prance";
|
2019-07-19 00:00:44 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|