You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add `_toml2json` attribute (label, default pointing to a tool). Note: Need to verify if `_toml2json` is already available or needs to be added. The `uv_lock.bzl` helper uses `attr._toml2json`, so it must be present on the calling rule/tag.
- For this step, select the highest version for each package name.
21
+
- Select the first wheel URL for that version.
22
+
- Create `whl_library` repositories for these wheels.
23
+
- Ensure these `whl_library` calls are integrated into `self._whl_libraries`.
24
+
25
+
3.**Verify**:
26
+
- Run `bazel run //tests/uv_pypi:bin`.
27
+
28
+
## Part 3: Advanced Implementation (Multiple Versions)
29
+
1.**Handle Resolution Markers**:
30
+
- Parse `resolution-markers` from `uv.lock` packages.
31
+
- Instead of picking one version, keep all versions that have distinct resolution markers.
32
+
33
+
2.**Use `wheel_tags_settings`**:
34
+
- In `hub_builder.bzl`, when constructing the hub repository content (via `hub_repository`), we need to pass information about these multiple versions.
35
+
- The `hub_repository` rule (or the macros creating it) needs to generate `define_wheel_tag_settings` in the `BUILD.bazel` of the hub.
36
+
- Generate `alias` targets using `select()` based on the defined settings.
37
+
38
+
3.**Refactor Hub Generation**:
39
+
- Update `hub_repository.bzl` (or the template it uses) to support this new "multi-version via select" pattern, if it doesn't already. The prompt suggests modifying the "hub build file for a package".
40
+
41
+
4.**Verify**:
42
+
- Run the test again. It should correctly pick `absl-py` 2.3.1 or 2.4.0 based on the environment/platform.
0 commit comments