at 25.11-pre 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 = "23.06.21.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-p+LZbQal4DPeMp+eJ2O83rCaL+QIUDcU34pZhYdN4bE="; 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 ] ++ lib.flatten (lib.attrValues optional-dependencies); 58 59 # Disable tests that require network 60 disabledTestPaths = [ "tests/test_convert.py" ]; 61 disabledTests = [ 62 "test_convert_defaults" 63 "test_convert_output" 64 "test_fetch_url_http" 65 "test_openapi_spec_validator_validate_failure" 66 ]; 67 pythonImportsCheck = [ "prance" ]; 68 69 meta = with lib; { 70 description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; 71 homepage = "https://github.com/RonnyPfannschmidt/prance"; 72 changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst"; 73 license = licenses.mit; 74 maintainers = [ ]; 75 mainProgram = "prance"; 76 }; 77}