Skip to content

Conversation

@alexreinking
Copy link
Member

Clean up Python dependencies

  1. We don't appear to use scipy anywhere (anymore?)
  2. Pillow is a transitive dependency of imageio, but we don't appear to use it anywhere directly.
  3. Move tools to their own dependency group
  4. Export the full set to requirements.txt

Use [dependency-groups] rather than [project.optional-dependencies] because the former is excluded from package metadata. The latter is meant to list dependencies whose presence enables optional features. The former is therefore a more appropriate place to list development dependencies.

Also document some useful information on using ccache with pip install ..

1. We don't appear to use scipy anywhere (anymore?)
2. Pillow is a transitive dependency of imageio, but we don't appear to
   use it anywhere directly.
3. Move tools to their own dependency group
4. Export the full set to requirements.txt

Use `[dependency-groups]` rather than `[project.optional-dependencies]`
because the former is excluded from package metadata. The latter is
meant to list dependencies whose presence enables optional _features_.
The former is therefore a more appropriate place to list development
dependencies.

Also document some useful information on using ccache
with `pip install .`.
@alexreinking alexreinking added code_cleanup No functional changes. Reformatting, reorganizing, or refactoring existing code. python Issues related to Halide/Python interop labels Jul 24, 2025
@alexreinking alexreinking requested a review from Copilot July 24, 2025 11:45
Copy link

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 cleans up Python dependencies by removing unused dependencies and reorganizes development dependencies into proper dependency groups. The changes also add comprehensive documentation for using uv and ccache with pip builds to improve the development experience.

  • Remove unused dependencies (scipy, pillow) from development dependencies
  • Migrate from [project.optional-dependencies] to [dependency-groups] and organize build tools into separate groups
  • Add documentation for uv usage and ccache configuration for faster pip builds

Reviewed Changes

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

File Description
pyproject.toml Reorganizes build system requirements order, adjusts numpy version constraint, removes unused dependencies, and restructures dependency groups
doc/Python.md Adds documentation for using uv as an alternative to pip for Python environment management
doc/BuildingHalideWithCMake.md Removes scipy from system dependencies and adds comprehensive ccache configuration documentation

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@steven-johnson
Copy link
Contributor

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

Did we turn on this Copilot nonsense on purpose?

@alexreinking
Copy link
Member Author

Did we turn on this Copilot nonsense on purpose?

I clicked the button by mistake, but at least it caught a typo 🤷‍♂️

@alexreinking alexreinking merged commit ea4f010 into main Jul 24, 2025
13 of 16 checks passed
@alexreinking alexreinking deleted the python/deps-and-docs branch July 24, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code_cleanup No functional changes. Reformatting, reorganizing, or refactoring existing code. python Issues related to Halide/Python interop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants