1{ lib 2, beartype 3, buildPythonPackage 4, click 5, fetchFromGitHub 6, license-expression 7, ply 8, pytestCheckHook 9, pythonOlder 10, pyyaml 11, rdflib 12, semantic-version 13, setuptools 14, setuptools-scm 15, uritools 16, xmltodict 17}: 18 19buildPythonPackage rec { 20 pname = "spdx-tools"; 21 version = "0.8.2"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "spdx"; 28 repo = "tools-python"; 29 rev = "refs/tags/v${version}"; 30 hash = "sha256-KB+tfuz0ZnoQcMX3H+IZXjcmPZ4x2ecl8ofz1/3r0/8="; 31 }; 32 33 SETUPTOOLS_SCM_PRETEND_VERSION = version; 34 35 nativeBuildInputs = [ 36 setuptools 37 setuptools-scm 38 ]; 39 40 propagatedBuildInputs = [ 41 beartype 42 click 43 license-expression 44 ply 45 pyyaml 46 rdflib 47 semantic-version 48 uritools 49 xmltodict 50 ]; 51 52 nativeCheckInputs = [ 53 pytestCheckHook 54 ]; 55 56 pythonImportsCheck = [ 57 "spdx_tools.spdx" 58 ]; 59 60 disabledTestPaths = [ 61 # Test depends on the currently not packaged pyshacl module 62 "tests/spdx3/validation/json_ld/test_shacl_validation.py" 63 ]; 64 65 disabledTests = [ 66 # Missing files 67 "test_spdx2_convert_to_spdx3" 68 "test_json_writer" 69 ]; 70 71 meta = with lib; { 72 description = "SPDX parser and tools"; 73 homepage = "https://github.com/spdx/tools-python"; 74 changelog = "https://github.com/spdx/tools-python/blob/v${version}/CHANGELOG.md"; 75 license = licenses.asl20; 76 maintainers = with maintainers; [ fab ]; 77 }; 78}