Skip to content

Conversation

windreamer
Copy link
Collaborator

@windreamer windreamer commented Jul 17, 2025

Motivation

The LMDeploy project currently utilizes a pyproject.toml file, but the build process isn't fully aligned with PEP 517 standards. This change aims to improve consistency and maintainability by adhering more closely to PEP 517 guidelines.

Modification

This PR refactors the LMDeploy build process to better align with PEP 517 standards, while retaining the necessary functionality for handling dynamic and optional dependencies. Key changes include:

  • Updated pyproject.toml: Revised the pyproject.toml file to more accurately define build requirements and dependencies, ensuring greater conformity with the PEP 517 specification.
  • Build Backend Configuration: Adjusted the build backend configuration within pyproject.toml to more reliably resolve dependencies during the build process.
  • Dependency Management: Ensured dependencies are clearly defined in pyproject.toml and/or setup.py for consistent dependency management.

Use cases

This change enables the use of a wider range of modern Python packaging tools. Specifically:

  • Standard pip installs: pip install . or python -m build will continue to work as expected.
  • Modern tools like uv: This change ensures compatibility with tools like uv, allowing developers to leverage its faster dependency resolution and other benefits.
  • CI/CD Pipelines: Enables consistent builds across different environments using any PEP 517 compliant build tool.

Checklist

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • The changes have been tested locally.
  • Documentation has been updated to reflect the changes.
  • All tests pass.
  • The PR addresses the issues outlined in the motivation, acknowledging the continued use of setup.py.

@windreamer windreamer added the WIP label Jul 17, 2025
@windreamer windreamer marked this pull request as ready for review July 17, 2025 07:56
@windreamer windreamer marked this pull request as draft July 17, 2025 07:56
@windreamer windreamer changed the title fix: make project PEP 517 complaint. fix: make project PEP 517 compliant. Jul 17, 2025
@windreamer windreamer force-pushed the try_pep517 branch 2 times, most recently from 3d8e325 to 58fabba Compare July 21, 2025 09:55
@windreamer windreamer removed the WIP label Jul 29, 2025
@windreamer windreamer marked this pull request as ready for review July 29, 2025 12:35
@windreamer
Copy link
Collaborator Author

This PR is a direct followup of #3726

@windreamer windreamer requested a review from lvhan028 August 17, 2025 13:32
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.

1 participant