Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 66 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, chardet 5, pyyaml 6, requests 7, six 8, semver 9, pytestCheckHook 10, pytestcov 11, pytestrunner 12, openapi-spec-validator 13}: 14 15buildPythonPackage rec { 16 pname = "prance"; 17 version = "0.20.2"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "4ffcddae6218cf6753a02af36ca9fb1c92eec4689441789ee2e9963230882388"; 22 }; 23 24 buildInputs = [ 25 pytestrunner 26 ]; 27 28 propagatedBuildInputs = [ 29 chardet 30 pyyaml 31 requests 32 six 33 semver 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 pytestcov 39 openapi-spec-validator 40 ]; 41 42 postPatch = '' 43 substituteInPlace setup.py \ 44 --replace "tests_require = dev_require," "tests_require = None," \ 45 --replace "chardet~=4.0" "" \ 46 --replace "semver~=2.13" "" 47 substituteInPlace setup.cfg \ 48 --replace "--cov-fail-under=90" "" 49 ''; 50 51 # Disable tests that require network 52 disabledTestPaths = [ 53 "tests/test_convert.py" 54 ]; 55 disabledTests = [ 56 "test_fetch_url_http" 57 ]; 58 pythonImportsCheck = [ "prance" ]; 59 60 meta = with lib; { 61 description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; 62 homepage = "https://github.com/jfinkhaeuser/prance"; 63 license = licenses.mit; 64 maintainers = [ maintainers.costrouc ]; 65 }; 66}