at 22.05-pre 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, chardet 5, requests 6, ruamel-yaml 7, six 8, semver 9, pytestCheckHook 10, openapi-spec-validator 11}: 12 13buildPythonPackage rec { 14 pname = "prance"; 15 version = "0.21.8.0"; 16 17 src = fetchFromGitHub { 18 owner = "RonnyPfannschmidt"; 19 repo = pname; 20 rev = "v${version}"; 21 fetchSubmodules = true; 22 sha256 = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ="; 23 }; 24 25 propagatedBuildInputs = [ 26 chardet 27 requests 28 ruamel-yaml 29 six 30 semver 31 ]; 32 33 checkInputs = [ 34 pytestCheckHook 35 openapi-spec-validator 36 ]; 37 38 postPatch = '' 39 substituteInPlace setup.cfg \ 40 --replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" 41 ''; 42 43 # Disable tests that require network 44 disabledTestPaths = [ 45 "tests/test_convert.py" 46 ]; 47 disabledTests = [ 48 "test_fetch_url_http" 49 ]; 50 pythonImportsCheck = [ "prance" ]; 51 52 meta = with lib; { 53 description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; 54 homepage = "https://github.com/jfinkhaeuser/prance"; 55 license = licenses.mit; 56 maintainers = [ maintainers.costrouc ]; 57 }; 58}