Skip to content

Wheel resolver#148

Closed
alunduil-tm wants to merge 2 commits intoplease-build:masterfrom
alunduil-tm:wheel_resolver
Closed

Wheel resolver#148
alunduil-tm wants to merge 2 commits intoplease-build:masterfrom
alunduil-tm:wheel_resolver

Conversation

@alunduil-tm
Copy link
Contributor

This is based on work that @samwestmoreland began but became stagnant. This adds a small tool to resolve wheels from names (with optional versions) to their wheel download URLs.

This is based on work that @samwestmoreland began but became stagnant.
This adds a small tool to resolve wheels from names (with optional
versions) to their wheel download URLs.
The interpreter being locked to the current interpreter in the passed
arguments was too restrictive. We needed to account for two things:

1. Intepreters should be a set including generic ones (such as py3)
2. The platform should always match the short phrase any

With these two changes made we now verify correctly that the following
command works:

```
plz run //tools/wheel_resolver -- --package pytest_unordered --version 0.6.0
```

Includes a test case of the above to ensure no regressions.
@goddenrich
Copy link
Contributor

I think this doesn't quite work with the python rules as is. The previous version in v0 did the downloading as well.

Build stopped after 1.12s. 1 target failed:
    //third_party/python3:_pycodestyle#download
error moving outputs for target //third_party/python3:_pycodestyle#download: rule //third_party/python3:_pycodestyle#download failed to create output plz-out/tmp/third_party/python3/_pycodestyle#download._build/pycodestyle.whl


$ plz build --profile noremote //third_party/python3:_pycodestyle#download --shell
Temp directories prepared, total time 70ms:
  //third_party/python3:_pycodestyle#download: plz-out/tmp/third_party/python3/_pycodestyle#download._build
    Command: $TOOL --package pycodestyle --version 2.10.0

$ $TOOL --package pycodestyle --version 2.10.0
locating pycodestyle-2.10.0
https://files.pythonhosted.org/packages/a2/54/001fdc0d69e8d0bb86c3423a6fa6dfada8cc26317c2635ab543e9ac411bd/pycodestyle-2.10.0-py2.py3-none-any.whl

@goddenrich goddenrich self-requested a review July 15, 2024 12:57
@goddenrich goddenrich mentioned this pull request Jul 19, 2024
@goddenrich goddenrich closed this Jul 24, 2024
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.

2 participants