Skip to content

Conversation

@levi42x
Copy link

@levi42x levi42x commented Nov 26, 2025

Fixes #4501

Description

This PR implements support for parsing Python UV package manager manifests in scancode-toolkit.

Changes

  • UvPyprojectTomlHandler: Parses pyproject.toml files with [tool.uv] sections
  • UvLockHandler: Parses uv.lock lockfiles with full dependency resolution
  • BaseUvPythonLayout: Manages UV project assembly and resource coordination
  • Helper functions:
    is_uv_pyproject_toml() for UV project detection
    parse_dependency_requirement() for PEP 508 dependency parsing

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    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: Shekhar Suman [email protected]

- Implement UvPyprojectTomlHandler to parse pyproject.toml with [tool.uv] sections
- Implement UvLockHandler to parse uv.lock lockfiles
- Add BaseUvPythonLayout for UV project assembly logic
- Add is_uv_pyproject_toml() helper for UV project detection
- Add parse_dependency_requirement() helper for dependency parsing
- Support standard dependencies, dev-dependencies, and optional groups
- Handle UV lockfile format with [[package]] entries and markers
- Add comprehensive test fixtures and test cases

Signed-off-by: Shekhar Suman [email protected]
Signed-off-by: Shekhar <[email protected]>
@levi42x levi42x force-pushed the feature/parse-uv_package branch from 64d01f0 to 900452d Compare November 27, 2025 03:45
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.

Support parsing python UV manifests

1 participant