at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 chardet, 7 click, 8 flex, 9 packaging, 10 pyicu, 11 requests, 12 ruamel-yaml, 13 setuptools-scm, 14 six, 15 swagger-spec-validator, 16 pytest-cov-stub, 17 pytestCheckHook, 18 openapi-spec-validator, 19}: 20 21buildPythonPackage rec { 22 pname = "prance"; 23 version = "25.04.08.0"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.8"; 27 28 src = fetchFromGitHub { 29 owner = "RonnyPfannschmidt"; 30 repo = "prance"; 31 tag = "v${version}"; 32 fetchSubmodules = true; 33 hash = "sha256-71M9ufxb0aaSgokThlsTS4ElOJLZntF2TYIErPccQbU="; 34 }; 35 36 build-system = [ setuptools-scm ]; 37 38 dependencies = [ 39 chardet 40 packaging 41 requests 42 ruamel-yaml 43 six 44 ]; 45 46 optional-dependencies = { 47 cli = [ click ]; 48 flex = [ flex ]; 49 icu = [ pyicu ]; 50 osv = [ openapi-spec-validator ]; 51 ssv = [ swagger-spec-validator ]; 52 }; 53 54 nativeCheckInputs = [ 55 pytest-cov-stub 56 pytestCheckHook 57 ] 58 ++ lib.flatten (lib.attrValues optional-dependencies); 59 60 # Disable tests that require network 61 disabledTestPaths = [ "tests/test_convert.py" ]; 62 disabledTests = [ 63 "test_convert_defaults" 64 "test_convert_output" 65 "test_fetch_url_http" 66 "test_openapi_spec_validator_validate_failure" 67 ]; 68 pythonImportsCheck = [ "prance" ]; 69 70 meta = with lib; { 71 description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; 72 homepage = "https://github.com/RonnyPfannschmidt/prance"; 73 changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst"; 74 license = licenses.mit; 75 maintainers = [ ]; 76 mainProgram = "prance"; 77 }; 78}