nixpkgs/pkgs/development/python-modules/prance/default.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

2019-07-19 00:00:44 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2019-07-19 00:00:44 +01:00
, chardet
, requests
, 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";
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
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 \
--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";
homepage = "https://github.com/jfinkhaeuser/prance";
2019-07-19 00:00:44 +01:00
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}