Skip to content

[proposal] New resolver configuration#938

Open
tiran wants to merge 1 commit intopython-wheel-build:mainfrom
tiran:proposal-new-resolver-config
Open

[proposal] New resolver configuration#938
tiran wants to merge 1 commit intopython-wheel-build:mainfrom
tiran:proposal-new-resolver-config

Conversation

@tiran
Copy link
Collaborator

@tiran tiran commented Feb 27, 2026

Add design proposal for new resolver configuration.

See: #937

@tiran tiran requested a review from a team as a code owner February 27, 2026 11:06
@mergify mergify bot added the ci label Feb 27, 2026
@tiran tiran force-pushed the proposal-new-resolver-config branch 3 times, most recently from ceb5b48 to 071d46c Compare March 3, 2026 14:21
@dhellmann dhellmann requested a review from shifa-khan March 3, 2026 22:30
@dhellmann
Copy link
Member

@shifa-khan has been looking at one of the other tickets related to similar work.

@tiran
Copy link
Collaborator Author

tiran commented Mar 4, 2026

I have inspect our downstream repo. Most prepare_source and download_source hooks can be replaced by the new resolver and download configuration. More than half of the plugins will no longer be necessary.

  • aiter: gitlab-git
  • amdsmi: special case to pin package
  • aotriton: special case
  • bitsandbytes: github-download
  • deep_ep: gitlab-download
  • deep_gemm: gitlab-git
  • detectron2: gitlab-download
  • faiis-cpu: pypi-git
  • flashinfer_python: pypi-git
  • flashinfer_jit_cache: gitlab-git
  • kubeflow: gitlab-download
  • litellm: gitlab-download
  • llama_stack: gitlab-download
  • mlflow: gitlab-download
  • mlflow_skinny: gitlab-download
  • mlflow_tracing: gitlab-download
  • mlserver: gitlab-download
  • mlserver_lightgbm: gitlab-download
  • mlserver_sklearn: gitlab-download
  • mlserver_xgboost: gitlab-download
  • nixl: gitlab-download
  • nvidia_cudnn_frontend: gitlab-download
  • nvidia_riva-python: pypi-git
  • opencv-python: gitlab-git
  • pplx_kernels: gitlab-download
  • submodlib_py: gitlab-clone (upstream has tags, version map is no longer necessary)
  • tacozip: pypi-git
  • tensorflow: github-git
  • tensorflow_rocm: special case
  • tilelang: gitlab-git
  • torchao: gitlab-git
  • tpu_info: special case, version map
  • tritonclient: gitlab-download
  • vllm: gitlab-download / special case?
  • vllm_bart_plugin: gitlab-download
  • vllm_neuron: gitlab-git

@tiran tiran requested a review from rd4398 March 16, 2026 16:10
Add design proposal for new resolver configuration.

See: python-wheel-build#937
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran force-pushed the proposal-new-resolver-config branch from 071d46c to 3356160 Compare March 16, 2026 16:11
- `resolver_dist.sdist_server_url` is replaced by `index_url` parameter.
All `pypi-*` profile support a custom index.
- `git_options.submodules` is not needed. Like pip, Fromager will always
clone all submodules.
Copy link
Contributor

@shifa-khan shifa-khan Mar 18, 2026

Choose a reason for hiding this comment

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

In our downstream, we have packages that explicitly need submodules=False and cases where submodules point to private repos or have broken URLs. These packages when migrated to YAML would deviate from current behavior. Do we have a workaround to address such cases?
For example, adding an optional submodules parameter with true as the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm curious, which package fails to build when submodules are enabled? Do you know? I was under the impression that engineers added submodules=False when the package did not need submodules.

Yes, we have a workaround: keep the Python plugin.

If we really need a submodules: false flag for several packages, then we could consider the feature in the future. I would like to start with a simple configuration (80/20 rules).

return None
return pep440_matcher
```

Copy link
Contributor

Choose a reason for hiding this comment

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

We also have simple regex patterns in downstream (e.g., ^v(\d+.\d+.\d+)-stable$). Could we support inline tag-pattern as an alternative to matcher_factory? This would avoid needing a plugin for a simple regex.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could add a mutually exclusive field. But I'd rather not. My first PoC had both a matcher_factory and tag_pattern option. It did not feel right. Pydantic does not have native support for mutual exclusive fields. They are also harder to document and explain.

Alternative proposal: Fromager could provide additional matcher factories. ^v(\d+.\d+.\d+)-stable$ is a generic and somewhat common pattern. That would eliminate the need for custom code in downstream.

@shifa-khan
Copy link
Contributor

downstream has few plugins call ensure_pkg_info() in prepare_source as boilerplate. Git clones never have PKG-INFO, but build tools (like setuptools-scm) need it before building. Could the git-based providers (gitlab-git, github-git, pypi-git) handle this automatically?

Copy link
Collaborator Author

@tiran tiran left a comment

Choose a reason for hiding this comment

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

downstream has few plugins call ensure_pkg_info() in prepare_source as boilerplate. Git clones never have PKG-INFO, but build tools (like setuptools-scm) need it before building. Could the git-based providers (gitlab-git, github-git, pypi-git) handle this automatically?

Great point! Yes, this will be handled automatically in two ways:

  • Fromager already adds PKG-INFO to the final sdist. In some cases, the file is added too late for some PEP 517 hooks.
  • Fromager will add a .git_archival.txt file to clones. Lala is working on the feature in #961 / #962 . This works for all setuptools-scm cases.

I'll update the design with the PKG-INFO and .git_archival.txt details.

- `resolver_dist.sdist_server_url` is replaced by `index_url` parameter.
All `pypi-*` profile support a custom index.
- `git_options.submodules` is not needed. Like pip, Fromager will always
clone all submodules.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm curious, which package fails to build when submodules are enabled? Do you know? I was under the impression that engineers added submodules=False when the package did not need submodules.

Yes, we have a workaround: keep the Python plugin.

If we really need a submodules: false flag for several packages, then we could consider the feature in the future. I would like to start with a simple configuration (80/20 rules).

return None
return pep440_matcher
```

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could add a mutually exclusive field. But I'd rather not. My first PoC had both a matcher_factory and tag_pattern option. It did not feel right. Pydantic does not have native support for mutual exclusive fields. They are also harder to document and explain.

Alternative proposal: Fromager could provide additional matcher factories. ^v(\d+.\d+.\d+)-stable$ is a generic and somewhat common pattern. That would eliminate the need for custom code in downstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants