Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.7 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, chardet 6, click 7, flex 8, packaging 9, pyicu 10, requests 11, ruamel-yaml 12, setuptools-scm 13, six 14, swagger-spec-validator 15, pytestCheckHook 16, openapi-spec-validator 17}: 18 19buildPythonPackage rec { 20 pname = "prance"; 21 version = "0.22.02.22.0"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.8"; 25 26 src = fetchFromGitHub { 27 owner = "RonnyPfannschmidt"; 28 repo = pname; 29 rev = "v${version}"; 30 fetchSubmodules = true; 31 hash = "sha256-NtIbZp34IcMYJzaNQVL9GLdNS3NYOCRoWS1wGg/gLVA="; 32 }; 33 34 postPatch = '' 35 substituteInPlace setup.cfg \ 36 --replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" 37 ''; 38 39 SETUPTOOLS_SCM_PRETEND_VERSION = version; 40 41 nativeBuildInputs = [ 42 setuptools-scm 43 ]; 44 45 propagatedBuildInputs = [ 46 chardet 47 packaging 48 requests 49 ruamel-yaml 50 six 51 ]; 52 53 passthru.optional-dependencies = { 54 cli = [ click ]; 55 flex = [ flex ]; 56 icu = [ pyicu ]; 57 osv = [ openapi-spec-validator ]; 58 ssv = [ swagger-spec-validator ]; 59 }; 60 61 nativeCheckInputs = [ 62 pytestCheckHook 63 ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); 64 65 # Disable tests that require network 66 disabledTestPaths = [ 67 "tests/test_convert.py" 68 ]; 69 disabledTests = [ 70 "test_convert_defaults" 71 "test_convert_output" 72 "test_fetch_url_http" 73 ]; 74 pythonImportsCheck = [ "prance" ]; 75 76 meta = with lib; { 77 changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst"; 78 description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; 79 homepage = "https://github.com/RonnyPfannschmidt/prance"; 80 license = licenses.mit; 81 maintainers = [ maintainers.costrouc ]; 82 }; 83}