-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Fix Python packaging edge cases #17159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Address some edge cases with packaging of Python subpackages in vLLM. The `vllm/benchmark` and `vllm/vllm_flash_attn` directories were missing `__init__.py` files. A subdirectory without an `__init__.py` is considered a namespace package. Because vLLM's `pyproject.toml` file excludes namespace packages, setuptools' package finder excludes the subpackages `vllm.benchmark` and `vllm.vllm_flash_attn` from wheel distributions. vLLM's wheels still shipped both subpackages, because vLLM also uses `setuptools-scm`. The build dependency hooks into setuptools and modifies its package finder. The override only works if-and-only-if a source checkout has a `.git` VCS directory. This change turns `vllm.benchmark` and `vllm.vllm_flash_attn` into regular importable packages and removes `namespaces = false` from setuptools' package finder configuration. It also changes the finder excludes into finder includes for `vllm*`, which matches `vllm` root package and all `vllm` subpackages. Closes: vllm-project#15812 Signed-off-by: Christian Heimes <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
Signed-off-by: Christian Heimes <[email protected]> Signed-off-by: Agata Dobrzyniewicz <[email protected]>
Signed-off-by: Christian Heimes <[email protected]> Signed-off-by: Mu Huai <[email protected]>
Signed-off-by: Christian Heimes <[email protected]> Signed-off-by: Yuqi Zhang <[email protected]>
Signed-off-by: Christian Heimes <[email protected]> Signed-off-by: minpeter <[email protected]>
Address some edge cases with packaging of Python subpackages in vLLM. The
vllm/benchmark
andvllm/vllm_flash_attn
directories were missing__init__.py
files. A subdirectory without an__init__.py
is considered a namespace package. Because vLLM'spyproject.toml
file excludes namespace packages, setuptools' package finder excludes the subpackagesvllm.benchmark
andvllm.vllm_flash_attn
from wheel distributions.vLLM's wheels still shipped both subpackages, because vLLM also uses
setuptools-scm
. The build dependency hooks into setuptools and modifies its package finder. The override only works if-and-only-if a source checkout has a.git
VCS directory.This change turns
vllm.benchmark
andvllm.vllm_flash_attn
into regular importable packages and removesnamespaces = false
from setuptools' package finder configuration. It also changes the finder excludes into finder includes forvllm*
, which matchesvllm
root package and allvllm
subpackages.FIX #15812