Name: scancode-toolkit Version: 32.0.6 Release: %autorelease Summary: Scan code and detect licenses, copyrights, and more. # Apache-2.0: main program # CC-BY-4.0: ScanCode datasets for license detection License: Apache-2.0 AND CC-BY-4.0 URL: https://scancode-toolkit.readthedocs.io/ VCS: https://github.com/nexB/scancode-toolkit Source: %VCS/archive/v%{version}/%{name}-%{version}.tar.gz Patch: 0001-Set-licensedcode_cache_dir-in-user-home-when-outside.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-reredirects) BuildRequires: python3dist(sphinx-rtd-theme) %global common_description %{expand: ScanCode is an open-source tool to scan code and detect licenses, copyrights, and more. It provides detailed information about discovered licenses, copyrights, and other important details in various formats.} %description %{common_description} %package doc Summary: Documentation for python-%{name} BuildArch: noarch %description doc %{common_description} This package is providing the documentation for %{name}. %prep %autosetup -p1 sed -i 's|\(fallback_version = "\)[^"]*|\1%{version}|' pyproject.toml sed -i 's|spdx_tools == 0.7.0rc0|spdx_tools >= 0.7.0, < 0.8.0|' setup.cfg %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel # generate html docs sphinx-build-3 -b html docs/source html # remove the sphinx-build-3 leftovers rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files scancode_config %check # https://github.com/nexB/scancode-toolkit/issues/3496 %pytest -k 'not test_debian_basic and not test_debian_multiple_files and not test_dump_rule_file and not test_json_pretty_print and not test_json_compact and not test_json_with_extracted_license_statements and not test_jsonlines and not test_jsonlines_with_package_and_license and not test_yaml and not test_scan_produces_valid_yaml_with_extracted_license_statements and not test_end_to_end_scan_with_license_policy and not test_is_licensing_works and not test_parse_from_rb and not test_parse_from_rb_dependency_requirement and not test_scan_cli_works and not test_license_reference_detection_in_manifest_unknown_reference_nuget and not test_get_top_level_resources and not test_package_command_scan_chef and not test_package_scan_pypi_end_to_end_full and not test_package_scan_pypi_end_to_end_full_with_license and not test_package_scan_pypi_end_to_end_skip_site_packages and not test_develop_with_parse and not test_develop_with_parse_metadata and not test_parse_with_eggfile and not test_parse_with_unpacked_wheel_meta_v20_1 and not test_parse_with_unpacked_wheel_meta_v20_2 and not test_parse_with_unpacked_wheel_meta_v20_3 and not test_parse_with_unpacked_wheel_meta_v20_4 and not test_parse_with_unpacked_wheel_meta_v21_1 and not test_parse_with_unpacked_wheel_meta_v21_2 and not test_parse_with_unpacked_wheel_meta_v21_3 and not test_parse_metadata_prefer_pkg_info_from_egg_info_from_command_line and not test_parse_dependency_file_with_invalid_does_not_fail and not test_collect_installed_rpmdb_xmlish_from_rootfs and not test_scan_system_package_end_to_end_installed_win_reg and not test_scan_can_handle_weird_file_names and not test_scan_can_run_from_other_directory and not test_scan_logs_errors_messages_not_verbosely_on_stderr and not test_scan_logs_errors_messages_not_verbosely_on_stderr_with_multiprocessing and not test_scan_logs_errors_messages_verbosely and not test_scan_logs_errors_messages_verbosely_with_verbose_and_multiprocessing and not test_scan_progress_display_is_not_damaged_with_long_file_names_plain and not test_scan_keep_temp_files_is_false_by_default and not test_scan_keep_temp_files_keeps_files and not test_about_files_etc and not test_about_files_self and not test_about_files_src and not test_classify_with_package_data and not test_consolidate_package and not test_consolidate_package_files_should_not_be_considered_in_license_holder_consolidated_component and not test_consolidate_component_package_from_json_can_run_twice and not test_consolidate_component_package_from_live_scan and not test_consolidate_package_always_include_own_manifest_file and not test_consolidate_component_package_build_from_live_scan and not test_consolidate_report_minority_origin_directory and not test_end2end_todo_works_on_codebase_without_ambiguous_detections' %files -f %{pyproject_files} %doc AUTHORS.rst CHANGELOG.rst CODE_OF_CONDUCT.rst %doc CONTRIBUTING.rst README.rst ROADMAP.rst %license NOTICE apache-2.0.LICENSE cc-by-4.0.LICENSE %{_bindir}/regen-package-docs %{_bindir}/scancode %{_bindir}/scancode-license-data %{_bindir}/scancode-reindex-licenses %{python3_sitelib}/cluecode %{python3_sitelib}/formattedcode %{python3_sitelib}/licensedcode %{python3_sitelib}/packagedcode %{python3_sitelib}/scancode %{python3_sitelib}/summarycode %{python3_sitelib}/textcode %files doc %doc html %license NOTICE apache-2.0.LICENSE cc-by-4.0.LICENSE %changelog %autochangelog