Skip to content

Commit

Permalink
fix: support latest ansible packages (#4045)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Jan 10, 2025
1 parent 065dd8f commit 432e0c3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
9 changes: 9 additions & 0 deletions docs/dev-tools/backends/pipx.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ Additional arguments to pass to `pipx` when installing the package.
"pipx:black" = { version = "latest", pipx_args = "--preinstall" }
```

### `uvx`

Set to `false` to always disable uv for this tool.

```toml
[tools]
"pipx:ansible" = { version = "latest", uvx = "false", pipx_args = "--include-deps" }
```

### `uvx_args`

Additional arguments to pass to `uvx` when installing the package.
Expand Down
3 changes: 2 additions & 1 deletion docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ You can also specify the full name for a tool using `mise use aqua:1password/cli
| alp | [aqua:tkuchiki/alp](https://github.com/tkuchiki/alp) [asdf:asdf-community/asdf-alp](https://github.com/asdf-community/asdf-alp) |
| amass | [ubi:owasp-amass/amass](https://github.com/owasp-amass/amass) [asdf:dhoeric/asdf-amass](https://github.com/dhoeric/asdf-amass) |
| amazon-ecr-credential-helper | [aqua:awslabs/amazon-ecr-credential-helper](https://github.com/awslabs/amazon-ecr-credential-helper) [asdf:dex4er/asdf-amazon-ecr-credential-helper](https://github.com/dex4er/asdf-amazon-ecr-credential-helper) |
| ansible-base | [asdf:mise-plugins/mise-pyapp](https://github.com/mise-plugins/mise-pyapp) |
| ansible | [pipx:ansible](https://pypi.org/project/ansible) |
| ansible-core | [pipx:ansible-core](https://pypi.org/project/ansible-core) |
| ant | [asdf:mise-plugins/mise-ant](https://github.com/mise-plugins/mise-ant) |
| apko | [aqua:chainguard-dev/apko](https://github.com/chainguard-dev/apko) [ubi:chainguard-dev/apko](https://github.com/chainguard-dev/apko) [asdf:omissis/asdf-apko](https://github.com/omissis/asdf-apko) |
| apollo-ios | [asdf:mise-plugins/mise-apollo-ios-cli](https://github.com/mise-plugins/mise-apollo-ios-cli) |
Expand Down
8 changes: 5 additions & 3 deletions registry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ amazon-ecr-credential-helper.backends = [
"aqua:awslabs/amazon-ecr-credential-helper",
"asdf:dex4er/asdf-amazon-ecr-credential-helper"
]
# this isn't working with pipx yet since it is missing ansible
# ansible-base.backends = ["pipx:ansible-base[with=ansible]", "asdf:mise-plugins/mise-pyapp"]
ansible-base.backends = ["asdf:mise-plugins/mise-pyapp"]
ansible.backends = ["pipx:ansible[uvx=false,pipx_args=--include-deps]"]
ansible.test = ['ansible --version', 'ansible']
ansible-core.aliases = ["ansible-base"]
ansible-core.backends = ["pipx:ansible-core"]
ansible-core.test = ['ansible --version', 'ansible [core {{version}}]']
ant.backends = ["asdf:mise-plugins/mise-ant"]
apko.backends = [
"aqua:chainguard-dev/apko",
Expand Down
5 changes: 4 additions & 1 deletion src/backend/pipx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ impl Backend for PIPXBackend {
.parse::<PipxRequest>()?
.pipx_request(&tv.version, &tv.request.options());

if self.uv_is_installed() && SETTINGS.pipx.uvx != Some(false) {
if self.uv_is_installed()
&& SETTINGS.pipx.uvx != Some(false)
&& tv.request.options().get("uvx") != Some(&"false".to_string())
{
ctx.pr
.set_message(format!("uv tool install {pipx_request}"));
let mut cmd = Self::uvx_cmd(
Expand Down

0 comments on commit 432e0c3

Please sign in to comment.