Skip to content

Install licensedcode-data with ScanCode release wheels#5056

Open
macayu17 wants to merge 1 commit into
aboutcode-org:developfrom
macayu17:fix/5053-license-data-message
Open

Install licensedcode-data with ScanCode release wheels#5056
macayu17 wants to merge 1 commit into
aboutcode-org:developfrom
macayu17:fix/5053-license-data-message

Conversation

@macayu17
Copy link
Copy Markdown

Fixes #5053

This PR adds licensedcode-data to the default dependencies for the scancode-toolkit and scancode-toolkit-mini release wheel metadata.

The release wheels already depended on licensedcode-index, but default installs did not pull in the license data package. That could leave built-in license loading without the data files needed at runtime.

This also fixes the optional licenses extra typo from licensecode-data to licensedcode-data, and adds metadata tests so the release pyprojects keep the license data and index packages together.

Testing

  • F:\Anaconda\python.exe -m pytest tests/scancode/test_release_metadata.py -q
  • F:\Anaconda\python.exe -m py_compile tests/scancode/test_release_metadata.py
  • git diff --check upstream/develop...HEAD

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled and links the original issue above
  • Tests pass
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: macayu17 <anayush1406@gmail.com>
Copilot AI review requested due to automatic review settings May 23, 2026 17:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures licensedcode-data is installed by default with the scancode-toolkit and scancode-toolkit-mini release wheels, preventing runtime failures when built-in license loading expects bundled license data files.

Changes:

  • Add licensedcode-data to the default dependency lists for the two release-wheel pyproject-*.toml files.
  • Fix the licenses optional extra typo (licensecode-datalicensedcode-data) across pyprojects.
  • Add a metadata-focused test to keep release wheel dependencies consistent, and document the fix in the changelog.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/scancode/test_release_metadata.py Adds tests to assert release-wheel metadata includes both license index and license data packages, and that the licenses extra uses the correct package name.
pyproject.toml Fixes the licenses optional extra to reference licensedcode-data (and not the typo).
pyproject-scancode-toolkit.toml Adds licensedcode-data to default dependencies for the release wheel and fixes the licenses extra typo.
pyproject-scancode-toolkit-mini.toml Adds licensedcode-data to default dependencies for the mini release wheel and fixes the licenses extra typo.
CHANGELOG.rst Notes the dependency fix for default installs in the “Next release” section.
AUTHORS.rst Adds a new contributor entry.
Comments suppressed due to low confidence (1)

tests/scancode/test_release_metadata.py:50

  • These checks are also exact-string matches. If the optional dependency is ever expressed with a version/marker (e.g. licensedcode-data>=… or the typo appears as licensecode-data>=…), the assertions may give false negatives. Consider matching by parsed requirement name or using a prefix/name-based check.
        assert "licensedcode-data" in license_dependencies
        assert "licensecode-data" not in license_dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to +40
assert "licensedcode-data" in dependencies
assert "licensedcode-index" in dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading licenses should indicate licensedcode-data is not installed

2 participants