uvxy 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uvxy-0.0.1/.github/workflows/ci.yml +63 -0
- uvxy-0.0.1/.github/workflows/drift.yml +140 -0
- uvxy-0.0.1/.github/workflows/release.yml +213 -0
- uvxy-0.0.1/.gitignore +3 -0
- uvxy-0.0.1/CONTEXT.md +31 -0
- uvxy-0.0.1/Cargo.lock +253 -0
- uvxy-0.0.1/Cargo.toml +13 -0
- uvxy-0.0.1/LICENSE +21 -0
- uvxy-0.0.1/PKG-INFO +183 -0
- uvxy-0.0.1/README.md +165 -0
- uvxy-0.0.1/docs/PLAN.md +148 -0
- uvxy-0.0.1/docs/RELEASING.md +76 -0
- uvxy-0.0.1/docs/adr/0001-separate-config-file-no-directory-search.md +55 -0
- uvxy-0.0.1/docs/adr/0002-derive-flag-arity-from-shell-completions.md +70 -0
- uvxy-0.0.1/docs/adr/0003-drop-in-replacement-and-flag-namespace.md +49 -0
- uvxy-0.0.1/docs/adr/0004-build-wheels-with-maturin-action.md +32 -0
- uvxy-0.0.1/docs/adr/0005-pin-every-build-input-and-watch-the-floating-versions.md +39 -0
- uvxy-0.0.1/pyproject.toml +27 -0
- uvxy-0.0.1/rust-toolchain.toml +10 -0
- uvxy-0.0.1/src/config.rs +490 -0
- uvxy-0.0.1/src/flags.rs +828 -0
- uvxy-0.0.1/src/main.rs +155 -0
- uvxy-0.0.1/src/rewrite.rs +571 -0
- uvxy-0.0.1/src/uvbin.rs +370 -0
- uvxy-0.0.1/tests/cli.rs +349 -0
- uvxy-0.0.1/tests/common/mod.rs +282 -0
- uvxy-0.0.1/tests/drift.rs +244 -0
- uvxy-0.0.1/tests/fixtures/completions/uv-0.10.12.zsh +257 -0
- uvxy-0.0.1/tests/fixtures/completions/uv-0.11.33.zsh +263 -0
- uvxy-0.0.1/tests/fixtures/completions/uv-0.12.9.zsh +264 -0
- uvxy-0.0.1/tests/fixtures/completions/uv-0.8.24.zsh +207 -0
- uvxy-0.0.1/tests/fixtures/completions/uv-0.9.30.zsh +257 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
# A push to a branch that has an open pull request runs through the
|
|
4
|
+
# pull_request event. Push therefore covers only the main branch.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
CARGO_TERM_COLOR: always
|
|
19
|
+
RUST_BACKTRACE: 1
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
lint:
|
|
23
|
+
name: fmt and clippy
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
|
|
28
|
+
# This action installs the toolchain and caches the cargo registry and
|
|
29
|
+
# the target directory. It wraps Swatinem/rust-cache.
|
|
30
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
31
|
+
with:
|
|
32
|
+
# No `toolchain` input. The action then reads rust-toolchain.toml,
|
|
33
|
+
# which pins the version. See that file.
|
|
34
|
+
components: rustfmt, clippy
|
|
35
|
+
|
|
36
|
+
- name: Check formatting
|
|
37
|
+
run: cargo fmt --all -- --check
|
|
38
|
+
|
|
39
|
+
# --all-targets also lints the test code.
|
|
40
|
+
- name: Run clippy
|
|
41
|
+
run: cargo clippy --locked --all-targets -- -D warnings
|
|
42
|
+
|
|
43
|
+
test:
|
|
44
|
+
name: test on ${{ matrix.os }}
|
|
45
|
+
runs-on: ${{ matrix.os }}
|
|
46
|
+
strategy:
|
|
47
|
+
# Do not cancel the other platforms when one platform fails. src/uvbin.rs
|
|
48
|
+
# holds separate Unix and Windows branches. A failure on one platform must
|
|
49
|
+
# not hide a failure on another.
|
|
50
|
+
fail-fast: false
|
|
51
|
+
matrix:
|
|
52
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
|
+
|
|
56
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
57
|
+
with:
|
|
58
|
+
# No `toolchain` input. rust-toolchain.toml pins the version.
|
|
59
|
+
# Cache each platform under its own key.
|
|
60
|
+
cache-key: ${{ matrix.os }}
|
|
61
|
+
|
|
62
|
+
- name: Run tests
|
|
63
|
+
run: cargo test --locked
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
name: Drift
|
|
2
|
+
|
|
3
|
+
# This workflow watches the uv completion format. uvxy reads flag arity from
|
|
4
|
+
# `uv generate-shell-completion zsh`. See docs/adr/0002. A failure here means
|
|
5
|
+
# that uv changed its completion format. It does not mean that uvxy changed.
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
# Run every day at 06:17 UTC.
|
|
9
|
+
- cron: "17 6 * * *"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
CARGO_TERM_COLOR: always
|
|
17
|
+
RUST_BACKTRACE: 1
|
|
18
|
+
# The drift test skips itself unless this variable is set.
|
|
19
|
+
UVXY_DRIFT: "1"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
drift:
|
|
23
|
+
name: uv completion format drift check
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
|
|
28
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
29
|
+
with:
|
|
30
|
+
toolchain: stable
|
|
31
|
+
|
|
32
|
+
# Always take the newest uv release. This workflow must see a format
|
|
33
|
+
# change on the day that uv ships it.
|
|
34
|
+
- name: Install the latest uv
|
|
35
|
+
uses: astral-sh/setup-uv@v10.0.1
|
|
36
|
+
with:
|
|
37
|
+
version: latest
|
|
38
|
+
|
|
39
|
+
# Record the uv version. A reader of a failed run needs this value to
|
|
40
|
+
# find the release that changed the format.
|
|
41
|
+
- name: Record the uv version
|
|
42
|
+
id: uv-version
|
|
43
|
+
run: |
|
|
44
|
+
set -euo pipefail
|
|
45
|
+
uv --version
|
|
46
|
+
echo "version=$(uv --version)" >> "$GITHUB_OUTPUT"
|
|
47
|
+
echo "Tested against: \`$(uv --version)\`" >> "$GITHUB_STEP_SUMMARY"
|
|
48
|
+
|
|
49
|
+
# cargo test exits 0 when a filter matches no test. This step proves that
|
|
50
|
+
# a drift test exists. Without it the workflow can pass and monitor
|
|
51
|
+
# nothing.
|
|
52
|
+
- name: Confirm that a drift test exists
|
|
53
|
+
run: |
|
|
54
|
+
set -euo pipefail
|
|
55
|
+
cargo test --locked --no-run
|
|
56
|
+
cargo test --locked -- --list | tee test-list.txt
|
|
57
|
+
if ! grep -qi drift test-list.txt; then
|
|
58
|
+
echo "::error title=No drift test::cargo test lists no test with 'drift' in its name. This workflow monitors nothing. Add the drift test to tests/ or fix this workflow."
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# Run the whole suite. The suite name of the drift test is not fixed, so
|
|
63
|
+
# a filter can miss it. UVXY_DRIFT=1 stops the drift test from skipping.
|
|
64
|
+
- name: Run the test suite against the current uv release
|
|
65
|
+
id: drift-test
|
|
66
|
+
run: cargo test --locked -- --nocapture
|
|
67
|
+
|
|
68
|
+
- name: Report the drift failure
|
|
69
|
+
if: failure() && steps.drift-test.outcome == 'failure'
|
|
70
|
+
run: |
|
|
71
|
+
{
|
|
72
|
+
echo "## uv changed its completion format"
|
|
73
|
+
echo
|
|
74
|
+
echo "The drift check failed against uv \`${{ steps.uv-version.outputs.version }}\`."
|
|
75
|
+
echo
|
|
76
|
+
echo "uvxy reads flag arity from \`uv generate-shell-completion zsh\`."
|
|
77
|
+
echo "One or more drift tests failed. Read the test output above for the"
|
|
78
|
+
echo "assertion that failed, and for what changed."
|
|
79
|
+
echo
|
|
80
|
+
echo "Next steps:"
|
|
81
|
+
echo "1. Run \`uv generate-shell-completion zsh\` and read the new output."
|
|
82
|
+
echo "2. Update the parser in \`src/flags.rs\`."
|
|
83
|
+
echo "3. Update \`docs/adr/0002-derive-flag-arity-from-shell-completions.md\` if the approach no longer holds."
|
|
84
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
85
|
+
echo "::error title=uv changed its completion format::uvxy cannot build a flag table from uv ${{ steps.uv-version.outputs.version }}. Read the job summary."
|
|
86
|
+
exit 1
|
|
87
|
+
|
|
88
|
+
# rust-toolchain.toml pins the toolchain, so a new Rust release cannot turn a
|
|
89
|
+
# pull request red. This job reads the newest stable Rust instead, and it
|
|
90
|
+
# reports a new lint here rather than in somebody's pull request.
|
|
91
|
+
rust:
|
|
92
|
+
name: newest stable Rust check
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
env:
|
|
95
|
+
# rust-toolchain.toml wins over the toolchain that the action installs.
|
|
96
|
+
# This variable wins over rust-toolchain.toml.
|
|
97
|
+
RUSTUP_TOOLCHAIN: stable
|
|
98
|
+
steps:
|
|
99
|
+
- uses: actions/checkout@v7
|
|
100
|
+
|
|
101
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
102
|
+
with:
|
|
103
|
+
toolchain: stable
|
|
104
|
+
components: rustfmt, clippy
|
|
105
|
+
cache-key: drift-stable
|
|
106
|
+
|
|
107
|
+
- name: Record the Rust version
|
|
108
|
+
id: version
|
|
109
|
+
run: |
|
|
110
|
+
set -euo pipefail
|
|
111
|
+
rustc --version | tee rust-version.txt
|
|
112
|
+
echo "rust=$(rustc --version)" >> "$GITHUB_OUTPUT"
|
|
113
|
+
|
|
114
|
+
- name: Check formatting
|
|
115
|
+
run: cargo fmt --all -- --check
|
|
116
|
+
|
|
117
|
+
- name: Run clippy
|
|
118
|
+
run: cargo clippy --locked --all-targets -- -D warnings
|
|
119
|
+
|
|
120
|
+
- name: Run the tests
|
|
121
|
+
run: cargo test --locked
|
|
122
|
+
|
|
123
|
+
- name: Report the Rust drift
|
|
124
|
+
if: failure()
|
|
125
|
+
run: |
|
|
126
|
+
set -euo pipefail
|
|
127
|
+
{
|
|
128
|
+
echo "## The newest stable Rust rejects this code"
|
|
129
|
+
echo
|
|
130
|
+
echo "The check failed under \`${{ steps.version.outputs.rust }}\`."
|
|
131
|
+
echo "\`rust-toolchain.toml\` pins an older version, so pull"
|
|
132
|
+
echo "requests still pass."
|
|
133
|
+
echo
|
|
134
|
+
echo "Next steps:"
|
|
135
|
+
echo "1. Read the clippy output above."
|
|
136
|
+
echo "2. Fix the code."
|
|
137
|
+
echo "3. Raise the channel in \`rust-toolchain.toml\`."
|
|
138
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
139
|
+
echo "::error title=Newest stable Rust rejects this code::Read the job summary."
|
|
140
|
+
exit 1
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# uvxy is a Rust binary. It does not link PyO3. maturin therefore tags one
|
|
4
|
+
# `py3-none-<platform>` wheel per platform, and that wheel serves every Python
|
|
5
|
+
# version. See docs/adr/0004.
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
CARGO_TERM_COLOR: always
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
# maturin reads the version from Cargo.toml, and it ignores the tag. A tag
|
|
20
|
+
# that disagrees with Cargo.toml therefore publishes the version that
|
|
21
|
+
# Cargo.toml names, and it reports nothing. A PyPI version is permanent, so
|
|
22
|
+
# this job runs before every build job.
|
|
23
|
+
version:
|
|
24
|
+
name: check the tag against Cargo.toml
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v7
|
|
28
|
+
|
|
29
|
+
- name: Compare the tag with the version
|
|
30
|
+
run: |
|
|
31
|
+
set -euo pipefail
|
|
32
|
+
crate=$(python3 -c "import tomllib; print(tomllib.load(open('Cargo.toml','rb'))['package']['version'])")
|
|
33
|
+
echo "Cargo.toml names $crate"
|
|
34
|
+
|
|
35
|
+
if [ "${GITHUB_REF_TYPE}" != "tag" ]; then
|
|
36
|
+
echo "This run carries no tag, so it publishes nothing."
|
|
37
|
+
exit 0
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
41
|
+
echo "the tag names $tag"
|
|
42
|
+
|
|
43
|
+
if [ "$crate" != "$tag" ]; then
|
|
44
|
+
echo "::error title=The tag and Cargo.toml disagree::The tag names $tag. Cargo.toml names $crate. maturin reads Cargo.toml, so this release would publish $crate. Correct Cargo.toml, or move the tag."
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
echo "The tag and Cargo.toml agree."
|
|
48
|
+
|
|
49
|
+
macos:
|
|
50
|
+
name: wheel for ${{ matrix.target }}
|
|
51
|
+
needs: version
|
|
52
|
+
runs-on: macos-latest
|
|
53
|
+
strategy:
|
|
54
|
+
fail-fast: false
|
|
55
|
+
matrix:
|
|
56
|
+
target:
|
|
57
|
+
- aarch64-apple-darwin
|
|
58
|
+
- x86_64-apple-darwin
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v7
|
|
61
|
+
|
|
62
|
+
- name: Build the wheel
|
|
63
|
+
uses: PyO3/maturin-action@v1
|
|
64
|
+
with:
|
|
65
|
+
target: ${{ matrix.target }}
|
|
66
|
+
# Pin maturin. An unpinned action installs the newest maturin, and a
|
|
67
|
+
# new maturin can change the wheel that this workflow publishes.
|
|
68
|
+
maturin-version: "1.15.0"
|
|
69
|
+
args: --release --locked --out dist
|
|
70
|
+
sccache: "true"
|
|
71
|
+
|
|
72
|
+
# actions/upload-artifact v4 and later reject a repeated artifact name.
|
|
73
|
+
# Each matrix job therefore names its artifact after its target.
|
|
74
|
+
- uses: actions/upload-artifact@v7
|
|
75
|
+
with:
|
|
76
|
+
name: dist-wheel-macos-${{ matrix.target }}
|
|
77
|
+
path: dist
|
|
78
|
+
if-no-files-found: error
|
|
79
|
+
|
|
80
|
+
manylinux:
|
|
81
|
+
name: wheel for ${{ matrix.target }}
|
|
82
|
+
needs: version
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
strategy:
|
|
85
|
+
fail-fast: false
|
|
86
|
+
matrix:
|
|
87
|
+
target:
|
|
88
|
+
- x86_64-unknown-linux-gnu
|
|
89
|
+
- aarch64-unknown-linux-gnu
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v7
|
|
92
|
+
|
|
93
|
+
# maturin-action cross compiles inside a container, so this job needs
|
|
94
|
+
# no QEMU. The `manylinux` input names that container.
|
|
95
|
+
- name: Build the wheel
|
|
96
|
+
uses: PyO3/maturin-action@v1
|
|
97
|
+
with:
|
|
98
|
+
target: ${{ matrix.target }}
|
|
99
|
+
# `2014` names the container. `auto` resolves a tag at build time,
|
|
100
|
+
# and that tag can change.
|
|
101
|
+
manylinux: "2014"
|
|
102
|
+
maturin-version: "1.15.0"
|
|
103
|
+
args: --release --locked --out dist
|
|
104
|
+
sccache: "true"
|
|
105
|
+
|
|
106
|
+
- uses: actions/upload-artifact@v7
|
|
107
|
+
with:
|
|
108
|
+
name: dist-wheel-manylinux-${{ matrix.target }}
|
|
109
|
+
path: dist
|
|
110
|
+
if-no-files-found: error
|
|
111
|
+
|
|
112
|
+
musllinux:
|
|
113
|
+
name: wheel for ${{ matrix.target }}
|
|
114
|
+
needs: version
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
strategy:
|
|
117
|
+
fail-fast: false
|
|
118
|
+
matrix:
|
|
119
|
+
target:
|
|
120
|
+
- x86_64-unknown-linux-musl
|
|
121
|
+
- aarch64-unknown-linux-musl
|
|
122
|
+
steps:
|
|
123
|
+
- uses: actions/checkout@v7
|
|
124
|
+
|
|
125
|
+
# maturin-action builds a musl target in a rust-musl-cross container.
|
|
126
|
+
- name: Build the wheel
|
|
127
|
+
uses: PyO3/maturin-action@v1
|
|
128
|
+
with:
|
|
129
|
+
target: ${{ matrix.target }}
|
|
130
|
+
manylinux: musllinux_1_2
|
|
131
|
+
maturin-version: "1.15.0"
|
|
132
|
+
args: --release --locked --out dist
|
|
133
|
+
sccache: "true"
|
|
134
|
+
|
|
135
|
+
- uses: actions/upload-artifact@v7
|
|
136
|
+
with:
|
|
137
|
+
name: dist-wheel-musllinux-${{ matrix.target }}
|
|
138
|
+
path: dist
|
|
139
|
+
if-no-files-found: error
|
|
140
|
+
|
|
141
|
+
windows:
|
|
142
|
+
name: wheel for x86_64-pc-windows-msvc
|
|
143
|
+
needs: version
|
|
144
|
+
runs-on: windows-latest
|
|
145
|
+
steps:
|
|
146
|
+
- uses: actions/checkout@v7
|
|
147
|
+
|
|
148
|
+
- name: Build the wheel
|
|
149
|
+
uses: PyO3/maturin-action@v1
|
|
150
|
+
with:
|
|
151
|
+
target: x86_64-pc-windows-msvc
|
|
152
|
+
maturin-version: "1.15.0"
|
|
153
|
+
args: --release --locked --out dist
|
|
154
|
+
sccache: "true"
|
|
155
|
+
|
|
156
|
+
- uses: actions/upload-artifact@v7
|
|
157
|
+
with:
|
|
158
|
+
name: dist-wheel-windows-x86_64-pc-windows-msvc
|
|
159
|
+
path: dist
|
|
160
|
+
if-no-files-found: error
|
|
161
|
+
|
|
162
|
+
sdist:
|
|
163
|
+
name: sdist
|
|
164
|
+
needs: version
|
|
165
|
+
runs-on: ubuntu-latest
|
|
166
|
+
steps:
|
|
167
|
+
- uses: actions/checkout@v7
|
|
168
|
+
|
|
169
|
+
- name: Build the sdist
|
|
170
|
+
uses: PyO3/maturin-action@v1
|
|
171
|
+
with:
|
|
172
|
+
command: sdist
|
|
173
|
+
maturin-version: "1.15.0"
|
|
174
|
+
args: --out dist
|
|
175
|
+
|
|
176
|
+
- uses: actions/upload-artifact@v7
|
|
177
|
+
with:
|
|
178
|
+
name: dist-sdist
|
|
179
|
+
path: dist
|
|
180
|
+
if-no-files-found: error
|
|
181
|
+
|
|
182
|
+
publish:
|
|
183
|
+
name: publish to PyPI
|
|
184
|
+
runs-on: ubuntu-latest
|
|
185
|
+
needs: [macos, manylinux, musllinux, windows, sdist]
|
|
186
|
+
# A manual run builds and uploads every artifact. Only a tag publishes.
|
|
187
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
188
|
+
environment:
|
|
189
|
+
name: pypi
|
|
190
|
+
url: https://pypi.org/p/uvxy
|
|
191
|
+
permissions:
|
|
192
|
+
# Trusted publishing needs this permission. The workflow holds no API
|
|
193
|
+
# token.
|
|
194
|
+
id-token: write
|
|
195
|
+
steps:
|
|
196
|
+
- name: Collect every wheel and the sdist
|
|
197
|
+
uses: actions/download-artifact@v8
|
|
198
|
+
with:
|
|
199
|
+
# Every build job names its artifact with a "dist-" prefix. One
|
|
200
|
+
# glob therefore collects the wheels and the sdist.
|
|
201
|
+
pattern: dist-*
|
|
202
|
+
path: dist
|
|
203
|
+
merge-multiple: true
|
|
204
|
+
|
|
205
|
+
# A reader of the run log needs the file list. It proves that all seven
|
|
206
|
+
# wheels and the sdist arrived.
|
|
207
|
+
- name: List the distributions
|
|
208
|
+
run: ls -l dist
|
|
209
|
+
|
|
210
|
+
- name: Publish to PyPI
|
|
211
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
212
|
+
with:
|
|
213
|
+
packages-dir: dist
|
uvxy-0.0.1/.gitignore
ADDED
uvxy-0.0.1/CONTEXT.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# uvxy
|
|
2
|
+
|
|
3
|
+
`uvxy` is a wrapper around `uvx`. `uvx` infers a package name from the command
|
|
4
|
+
you type. When the two names differ, you must pass `--from`. `uvxy` reads that
|
|
5
|
+
`--from` value from a configuration file instead.
|
|
6
|
+
|
|
7
|
+
## Language
|
|
8
|
+
|
|
9
|
+
**Command**:
|
|
10
|
+
The executable name that a Python package installs, and the name a user types.
|
|
11
|
+
_Avoid_: tool name, script, entry point
|
|
12
|
+
|
|
13
|
+
**Package Spec**:
|
|
14
|
+
The value that `uvxy` supplies to `uvx --from`. It names a package, and it can
|
|
15
|
+
also constrain a version.
|
|
16
|
+
_Avoid_: package name, requirement, distribution
|
|
17
|
+
|
|
18
|
+
**Mapping**:
|
|
19
|
+
One entry in the configuration file. A mapping connects a command to a package
|
|
20
|
+
spec.
|
|
21
|
+
_Avoid_: alias, override, rule
|
|
22
|
+
|
|
23
|
+
**Passthrough Argument**:
|
|
24
|
+
An argument that `uvxy` sends to uvx without a change. Every argument is a
|
|
25
|
+
passthrough argument, except a namespaced flag.
|
|
26
|
+
_Avoid_: forwarded arg, pass-along, proxied argument
|
|
27
|
+
|
|
28
|
+
**Namespaced Flag**:
|
|
29
|
+
A flag that starts with `--uvxy-`. `uvxy` reads it and removes it. `uvxy` never
|
|
30
|
+
sends it to uvx.
|
|
31
|
+
_Avoid_: own flag, internal flag, private flag
|
uvxy-0.0.1/Cargo.lock
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "anyhow"
|
|
7
|
+
version = "1.0.104"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bitflags"
|
|
13
|
+
version = "2.13.1"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "cfg-if"
|
|
19
|
+
version = "1.0.4"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "equivalent"
|
|
25
|
+
version = "1.0.2"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "errno"
|
|
31
|
+
version = "0.3.14"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
|
34
|
+
dependencies = [
|
|
35
|
+
"libc",
|
|
36
|
+
"windows-sys",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[[package]]
|
|
40
|
+
name = "fastrand"
|
|
41
|
+
version = "2.5.0"
|
|
42
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
43
|
+
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
44
|
+
|
|
45
|
+
[[package]]
|
|
46
|
+
name = "getrandom"
|
|
47
|
+
version = "0.4.3"
|
|
48
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
+
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
|
50
|
+
dependencies = [
|
|
51
|
+
"cfg-if",
|
|
52
|
+
"libc",
|
|
53
|
+
"r-efi",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "hashbrown"
|
|
58
|
+
version = "0.17.1"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "indexmap"
|
|
64
|
+
version = "2.14.1"
|
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
|
+
checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb"
|
|
67
|
+
dependencies = [
|
|
68
|
+
"equivalent",
|
|
69
|
+
"hashbrown",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[[package]]
|
|
73
|
+
name = "libc"
|
|
74
|
+
version = "0.2.189"
|
|
75
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "linux-raw-sys"
|
|
80
|
+
version = "0.12.1"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
83
|
+
|
|
84
|
+
[[package]]
|
|
85
|
+
name = "once_cell"
|
|
86
|
+
version = "1.21.4"
|
|
87
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
88
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
89
|
+
|
|
90
|
+
[[package]]
|
|
91
|
+
name = "proc-macro2"
|
|
92
|
+
version = "1.0.107"
|
|
93
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
94
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
95
|
+
dependencies = [
|
|
96
|
+
"unicode-ident",
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
[[package]]
|
|
100
|
+
name = "quote"
|
|
101
|
+
version = "1.0.47"
|
|
102
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
103
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
104
|
+
dependencies = [
|
|
105
|
+
"proc-macro2",
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
[[package]]
|
|
109
|
+
name = "r-efi"
|
|
110
|
+
version = "6.0.0"
|
|
111
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
+
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
113
|
+
|
|
114
|
+
[[package]]
|
|
115
|
+
name = "rustix"
|
|
116
|
+
version = "1.1.4"
|
|
117
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
+
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
|
|
119
|
+
dependencies = [
|
|
120
|
+
"bitflags",
|
|
121
|
+
"errno",
|
|
122
|
+
"libc",
|
|
123
|
+
"linux-raw-sys",
|
|
124
|
+
"windows-sys",
|
|
125
|
+
]
|
|
126
|
+
|
|
127
|
+
[[package]]
|
|
128
|
+
name = "serde_core"
|
|
129
|
+
version = "1.0.229"
|
|
130
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
131
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
132
|
+
dependencies = [
|
|
133
|
+
"serde_derive",
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
[[package]]
|
|
137
|
+
name = "serde_derive"
|
|
138
|
+
version = "1.0.229"
|
|
139
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
141
|
+
dependencies = [
|
|
142
|
+
"proc-macro2",
|
|
143
|
+
"quote",
|
|
144
|
+
"syn",
|
|
145
|
+
]
|
|
146
|
+
|
|
147
|
+
[[package]]
|
|
148
|
+
name = "serde_spanned"
|
|
149
|
+
version = "1.1.1"
|
|
150
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
+
checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"serde_core",
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
[[package]]
|
|
157
|
+
name = "syn"
|
|
158
|
+
version = "3.0.4"
|
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
160
|
+
checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
|
|
161
|
+
dependencies = [
|
|
162
|
+
"proc-macro2",
|
|
163
|
+
"quote",
|
|
164
|
+
"unicode-ident",
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
[[package]]
|
|
168
|
+
name = "tempfile"
|
|
169
|
+
version = "3.27.0"
|
|
170
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
171
|
+
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
|
172
|
+
dependencies = [
|
|
173
|
+
"fastrand",
|
|
174
|
+
"getrandom",
|
|
175
|
+
"once_cell",
|
|
176
|
+
"rustix",
|
|
177
|
+
"windows-sys",
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
[[package]]
|
|
181
|
+
name = "toml"
|
|
182
|
+
version = "1.1.4+spec-1.1.0"
|
|
183
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
184
|
+
checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5"
|
|
185
|
+
dependencies = [
|
|
186
|
+
"indexmap",
|
|
187
|
+
"serde_core",
|
|
188
|
+
"serde_spanned",
|
|
189
|
+
"toml_datetime",
|
|
190
|
+
"toml_parser",
|
|
191
|
+
"toml_writer",
|
|
192
|
+
"winnow",
|
|
193
|
+
]
|
|
194
|
+
|
|
195
|
+
[[package]]
|
|
196
|
+
name = "toml_datetime"
|
|
197
|
+
version = "1.1.1+spec-1.1.0"
|
|
198
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
+
checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
|
|
200
|
+
dependencies = [
|
|
201
|
+
"serde_core",
|
|
202
|
+
]
|
|
203
|
+
|
|
204
|
+
[[package]]
|
|
205
|
+
name = "toml_parser"
|
|
206
|
+
version = "1.1.3+spec-1.1.0"
|
|
207
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
208
|
+
checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56"
|
|
209
|
+
dependencies = [
|
|
210
|
+
"winnow",
|
|
211
|
+
]
|
|
212
|
+
|
|
213
|
+
[[package]]
|
|
214
|
+
name = "toml_writer"
|
|
215
|
+
version = "1.1.2+spec-1.1.0"
|
|
216
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
+
checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
|
|
218
|
+
|
|
219
|
+
[[package]]
|
|
220
|
+
name = "unicode-ident"
|
|
221
|
+
version = "1.0.24"
|
|
222
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
223
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
224
|
+
|
|
225
|
+
[[package]]
|
|
226
|
+
name = "uvxy"
|
|
227
|
+
version = "0.0.1"
|
|
228
|
+
dependencies = [
|
|
229
|
+
"anyhow",
|
|
230
|
+
"tempfile",
|
|
231
|
+
"toml",
|
|
232
|
+
]
|
|
233
|
+
|
|
234
|
+
[[package]]
|
|
235
|
+
name = "windows-link"
|
|
236
|
+
version = "0.2.1"
|
|
237
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
238
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
239
|
+
|
|
240
|
+
[[package]]
|
|
241
|
+
name = "windows-sys"
|
|
242
|
+
version = "0.61.2"
|
|
243
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
244
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
245
|
+
dependencies = [
|
|
246
|
+
"windows-link",
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
[[package]]
|
|
250
|
+
name = "winnow"
|
|
251
|
+
version = "1.0.4"
|
|
252
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
253
|
+
checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
|