mirror of https://github.com/astral-sh/uv
Publish to `crates.io` (#16770)
This commit is contained in:
parent
e799a088a5
commit
dfe89047bb
|
|
@ -178,6 +178,22 @@ jobs:
|
|||
working-directory: ${{ env.UV_WORKSPACE }}
|
||||
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
||||
|
||||
cargo-publish-dry-run:
|
||||
timeout-minutes: 20
|
||||
needs: determine_changes
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
|
||||
runs-on: depot-ubuntu-22.04-8
|
||||
name: "cargo publish dry-run"
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: "cargo publish dry-run"
|
||||
run: cargo publish --workspace --dry-run
|
||||
|
||||
cargo-dev-generate-all:
|
||||
timeout-minutes: 10
|
||||
needs: determine_changes
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
# Publish a release to crates.io.
|
||||
#
|
||||
# Assumed to run as a subworkflow of .github/workflows/release.yml; specifically, as a publish job
|
||||
# within `cargo-dist`.
|
||||
name: "Publish to crates.io"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
plan:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
crates-publish-uv:
|
||||
name: Upload uv to crates.io
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: release
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
# TODO(zanieb): Switch to trusted publishing once published
|
||||
# - uses: rust-lang/crates-io-auth-action@v1
|
||||
# id: auth
|
||||
- name: Publish workspace crates
|
||||
run: cargo publish --workspace
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
|
||||
|
|
@ -222,16 +222,31 @@ jobs:
|
|||
"id-token": "write"
|
||||
"packages": "write"
|
||||
|
||||
custom-publish-crates:
|
||||
needs:
|
||||
- plan
|
||||
- host
|
||||
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
|
||||
uses: ./.github/workflows/publish-crates.yml
|
||||
with:
|
||||
plan: ${{ needs.plan.outputs.val }}
|
||||
secrets: inherit
|
||||
# publish jobs get escalated permissions
|
||||
permissions:
|
||||
"id-token": "write"
|
||||
"packages": "write"
|
||||
|
||||
# Create a GitHub Release while uploading all files to it
|
||||
announce:
|
||||
needs:
|
||||
- plan
|
||||
- host
|
||||
- custom-publish-pypi
|
||||
- custom-publish-crates
|
||||
# use "always() && ..." to allow us to wait for all publish jobs while
|
||||
# still allowing individual publish jobs to skip themselves (for prereleases).
|
||||
# "host" however must run to completion, no skipping allowed!
|
||||
if: ${{ always() && needs.host.result == 'success' && (needs.custom-publish-pypi.result == 'skipped' || needs.custom-publish-pypi.result == 'success') }}
|
||||
if: ${{ always() && needs.host.result == 'success' && (needs.custom-publish-pypi.result == 'skipped' || needs.custom-publish-pypi.result == 'success') && (needs.custom-publish-crates.result == 'skipped' || needs.custom-publish-crates.result == 'success') }}
|
||||
runs-on: "depot-ubuntu-latest-4"
|
||||
permissions:
|
||||
"attestations": "write"
|
||||
|
|
|
|||
|
|
@ -5537,7 +5537,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-bench"
|
||||
version = "0.0.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"codspeed-criterion-compat",
|
||||
|
|
@ -5600,7 +5600,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-build-backend"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"astral-version-ranges",
|
||||
"base64 0.22.1",
|
||||
|
|
@ -6154,7 +6154,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-globfilter"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"fs-err",
|
||||
|
|
@ -6289,7 +6289,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-metadata"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"astral_async_zip",
|
||||
"fs-err",
|
||||
|
|
@ -6332,7 +6332,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-pep440"
|
||||
version = "0.7.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"astral-version-ranges",
|
||||
"indoc",
|
||||
|
|
@ -6346,7 +6346,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-pep508"
|
||||
version = "0.6.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"arcstr",
|
||||
"astral-version-ranges",
|
||||
|
|
@ -6375,7 +6375,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-performance-memory-allocator"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"mimalloc",
|
||||
"tikv-jemallocator",
|
||||
|
|
@ -6422,7 +6422,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-publish"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"ambient-id",
|
||||
"astral-reqwest-middleware",
|
||||
|
|
@ -6566,7 +6566,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-requirements"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"configparser",
|
||||
|
|
@ -6829,7 +6829,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uv-torch"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"either",
|
||||
|
|
@ -6892,7 +6892,7 @@ version = "0.9.10"
|
|||
|
||||
[[package]]
|
||||
name = "uv-virtualenv"
|
||||
version = "0.0.4"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"console 0.16.1",
|
||||
"fs-err",
|
||||
|
|
|
|||
120
Cargo.toml
120
Cargo.toml
|
|
@ -4,9 +4,6 @@ exclude = [
|
|||
"scripts",
|
||||
# Needs nightly
|
||||
"crates/uv-trampoline",
|
||||
# Only used to pull in features, allocators, etc. — we specifically don't want them
|
||||
# to be part of a workspace-wide cargo check, cargo clippy, etc.
|
||||
"crates/uv-performance-memory-allocator",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
|
|
@ -20,63 +17,64 @@ authors = ["uv"]
|
|||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
uv-auth = { path = "crates/uv-auth" }
|
||||
uv-bin-install = { path = "crates/uv-bin-install" }
|
||||
uv-build-backend = { path = "crates/uv-build-backend" }
|
||||
uv-build-frontend = { path = "crates/uv-build-frontend" }
|
||||
uv-cache = { path = "crates/uv-cache" }
|
||||
uv-cache-info = { path = "crates/uv-cache-info" }
|
||||
uv-cache-key = { path = "crates/uv-cache-key" }
|
||||
uv-cli = { path = "crates/uv-cli" }
|
||||
uv-client = { path = "crates/uv-client" }
|
||||
uv-configuration = { path = "crates/uv-configuration" }
|
||||
uv-console = { path = "crates/uv-console" }
|
||||
uv-dirs = { path = "crates/uv-dirs" }
|
||||
uv-dispatch = { path = "crates/uv-dispatch" }
|
||||
uv-distribution = { path = "crates/uv-distribution" }
|
||||
uv-distribution-filename = { path = "crates/uv-distribution-filename" }
|
||||
uv-distribution-types = { path = "crates/uv-distribution-types" }
|
||||
uv-extract = { path = "crates/uv-extract" }
|
||||
uv-flags = { path = "crates/uv-flags" }
|
||||
uv-fs = { path = "crates/uv-fs", features = ["serde", "tokio"] }
|
||||
uv-git = { path = "crates/uv-git" }
|
||||
uv-git-types = { path = "crates/uv-git-types" }
|
||||
uv-globfilter = { path = "crates/uv-globfilter" }
|
||||
uv-install-wheel = { path = "crates/uv-install-wheel", default-features = false }
|
||||
uv-installer = { path = "crates/uv-installer" }
|
||||
uv-keyring = { path = "crates/uv-keyring" }
|
||||
uv-logging = { path = "crates/uv-logging" }
|
||||
uv-macros = { path = "crates/uv-macros" }
|
||||
uv-metadata = { path = "crates/uv-metadata" }
|
||||
uv-normalize = { path = "crates/uv-normalize" }
|
||||
uv-once-map = { path = "crates/uv-once-map" }
|
||||
uv-options-metadata = { path = "crates/uv-options-metadata" }
|
||||
uv-pep440 = { path = "crates/uv-pep440", features = ["tracing", "rkyv", "version-ranges"] }
|
||||
uv-pep508 = { path = "crates/uv-pep508", features = ["non-pep508-extensions"] }
|
||||
uv-platform = { path = "crates/uv-platform" }
|
||||
uv-platform-tags = { path = "crates/uv-platform-tags" }
|
||||
uv-preview = { path = "crates/uv-preview" }
|
||||
uv-publish = { path = "crates/uv-publish" }
|
||||
uv-pypi-types = { path = "crates/uv-pypi-types" }
|
||||
uv-python = { path = "crates/uv-python" }
|
||||
uv-redacted = { path = "crates/uv-redacted" }
|
||||
uv-requirements = { path = "crates/uv-requirements" }
|
||||
uv-requirements-txt = { path = "crates/uv-requirements-txt" }
|
||||
uv-resolver = { path = "crates/uv-resolver" }
|
||||
uv-scripts = { path = "crates/uv-scripts" }
|
||||
uv-settings = { path = "crates/uv-settings" }
|
||||
uv-shell = { path = "crates/uv-shell" }
|
||||
uv-small-str = { path = "crates/uv-small-str" }
|
||||
uv-state = { path = "crates/uv-state" }
|
||||
uv-static = { path = "crates/uv-static" }
|
||||
uv-tool = { path = "crates/uv-tool" }
|
||||
uv-torch = { path = "crates/uv-torch" }
|
||||
uv-trampoline-builder = { path = "crates/uv-trampoline-builder" }
|
||||
uv-types = { path = "crates/uv-types" }
|
||||
uv-version = { path = "crates/uv-version" }
|
||||
uv-virtualenv = { path = "crates/uv-virtualenv" }
|
||||
uv-warnings = { path = "crates/uv-warnings" }
|
||||
uv-workspace = { path = "crates/uv-workspace" }
|
||||
uv-auth = { version = "0.0.1", path = "crates/uv-auth" }
|
||||
uv-bin-install = { version = "0.0.1", path = "crates/uv-bin-install" }
|
||||
uv-build-backend = { version = "0.0.1", path = "crates/uv-build-backend" }
|
||||
uv-build-frontend = { version = "0.0.1", path = "crates/uv-build-frontend" }
|
||||
uv-cache = { version = "0.0.1", path = "crates/uv-cache" }
|
||||
uv-cache-info = { version = "0.0.1", path = "crates/uv-cache-info" }
|
||||
uv-cache-key = { version = "0.0.1", path = "crates/uv-cache-key" }
|
||||
uv-cli = { version = "0.0.1", path = "crates/uv-cli" }
|
||||
uv-client = { version = "0.0.1", path = "crates/uv-client" }
|
||||
uv-configuration = { version = "0.0.1", path = "crates/uv-configuration" }
|
||||
uv-console = { version = "0.0.1", path = "crates/uv-console" }
|
||||
uv-dirs = { version = "0.0.1", path = "crates/uv-dirs" }
|
||||
uv-dispatch = { version = "0.0.1", path = "crates/uv-dispatch" }
|
||||
uv-distribution = { version = "0.0.1", path = "crates/uv-distribution" }
|
||||
uv-distribution-filename = { version = "0.0.1", path = "crates/uv-distribution-filename" }
|
||||
uv-distribution-types = { version = "0.0.1", path = "crates/uv-distribution-types" }
|
||||
uv-extract = { version = "0.0.1", path = "crates/uv-extract" }
|
||||
uv-flags = { version = "0.0.1", path = "crates/uv-flags" }
|
||||
uv-fs = { version = "0.0.1", path = "crates/uv-fs", features = ["serde", "tokio"] }
|
||||
uv-git = { version = "0.0.1", path = "crates/uv-git" }
|
||||
uv-git-types = { version = "0.0.1", path = "crates/uv-git-types" }
|
||||
uv-globfilter = { version = "0.0.1", path = "crates/uv-globfilter" }
|
||||
uv-install-wheel = { version = "0.0.1", path = "crates/uv-install-wheel", default-features = false }
|
||||
uv-installer = { version = "0.0.1", path = "crates/uv-installer" }
|
||||
uv-keyring = { version = "0.0.1", path = "crates/uv-keyring" }
|
||||
uv-logging = { version = "0.0.1", path = "crates/uv-logging" }
|
||||
uv-macros = { version = "0.0.1", path = "crates/uv-macros" }
|
||||
uv-metadata = { version = "0.0.1", path = "crates/uv-metadata" }
|
||||
uv-normalize = { version = "0.0.1", path = "crates/uv-normalize" }
|
||||
uv-once-map = { version = "0.0.1", path = "crates/uv-once-map" }
|
||||
uv-options-metadata = { version = "0.0.1", path = "crates/uv-options-metadata" }
|
||||
uv-performance-memory-allocator = { version = "0.0.1", path = "crates/uv-performance-memory-allocator" }
|
||||
uv-pep440 = { version = "0.0.1", path = "crates/uv-pep440", features = ["tracing", "rkyv", "version-ranges"] }
|
||||
uv-pep508 = { version = "0.0.1", path = "crates/uv-pep508", features = ["non-pep508-extensions"] }
|
||||
uv-platform = { version = "0.0.1", path = "crates/uv-platform" }
|
||||
uv-platform-tags = { version = "0.0.1", path = "crates/uv-platform-tags" }
|
||||
uv-preview = { version = "0.0.1", path = "crates/uv-preview" }
|
||||
uv-publish = { version = "0.0.1", path = "crates/uv-publish" }
|
||||
uv-pypi-types = { version = "0.0.1", path = "crates/uv-pypi-types" }
|
||||
uv-python = { version = "0.0.1", path = "crates/uv-python" }
|
||||
uv-redacted = { version = "0.0.1", path = "crates/uv-redacted" }
|
||||
uv-requirements = { version = "0.0.1", path = "crates/uv-requirements" }
|
||||
uv-requirements-txt = { version = "0.0.1", path = "crates/uv-requirements-txt" }
|
||||
uv-resolver = { version = "0.0.1", path = "crates/uv-resolver" }
|
||||
uv-scripts = { version = "0.0.1", path = "crates/uv-scripts" }
|
||||
uv-settings = { version = "0.0.1", path = "crates/uv-settings" }
|
||||
uv-shell = { version = "0.0.1", path = "crates/uv-shell" }
|
||||
uv-small-str = { version = "0.0.1", path = "crates/uv-small-str" }
|
||||
uv-state = { version = "0.0.1", path = "crates/uv-state" }
|
||||
uv-static = { version = "0.0.1", path = "crates/uv-static" }
|
||||
uv-tool = { version = "0.0.1", path = "crates/uv-tool" }
|
||||
uv-torch = { version = "0.0.1", path = "crates/uv-torch" }
|
||||
uv-trampoline-builder = { version = "0.0.1", path = "crates/uv-trampoline-builder" }
|
||||
uv-types = { version = "0.0.1", path = "crates/uv-types" }
|
||||
uv-version = { version = "0.9.10", path = "crates/uv-version" }
|
||||
uv-virtualenv = { version = "0.0.1", path = "crates/uv-virtualenv" }
|
||||
uv-warnings = { version = "0.0.1", path = "crates/uv-warnings" }
|
||||
uv-workspace = { version = "0.0.1", path = "crates/uv-workspace" }
|
||||
|
||||
ambient-id = { version = "0.0.6", default-features = false, features = ["astral-reqwest-middleware"] }
|
||||
anstream = { version = "0.6.15" }
|
||||
|
|
@ -226,7 +224,7 @@ tokio-rustls = { version = "0.26.2", default-features = false }
|
|||
whoami = { version = "1.6.0" }
|
||||
|
||||
[workspace.metadata.cargo-shear]
|
||||
ignored = ["flate2", "xz2", "h2"]
|
||||
ignored = ["flate2", "xz2", "h2", "uv-performance-memory-allocator"]
|
||||
|
||||
[workspace.lints.rust]
|
||||
unsafe_code = "warn"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-auth"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-bench"
|
||||
version = "0.0.0"
|
||||
description = "uv Micro-benchmarks"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
publish = false
|
||||
authors = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-bin-install"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
@ -8,7 +9,6 @@ documentation = { workspace = true }
|
|||
repository = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
description = "Binary download and installation utilities for uv"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-build-backend"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-build-frontend"
|
||||
version = "0.0.1"
|
||||
description = "Build wheels from source distributions"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-build"
|
||||
version = "0.9.10"
|
||||
description = "A Python build backend"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-cache-info"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-cache-key"
|
||||
version = "0.0.1"
|
||||
description = "Generic functionality for caching paths, URLs, and other resources across platforms."
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-cache"
|
||||
version = "0.0.1"
|
||||
description = "Generate stable hash digests across versions and platforms."
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-cli"
|
||||
version = "0.0.1"
|
||||
description = "The command line interface for the uv binary."
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-client"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
# `pypi-client`
|
||||
|
||||
A general-use client for interacting with PyPI.
|
||||
|
||||
Loosely modeled after Orogene's `oro-client`.
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-configuration"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-console"
|
||||
version = "0.0.1"
|
||||
description = "Utilities for interacting with the terminal"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-dev"
|
||||
version = "0.0.1"
|
||||
description = "Build wheels from source distributions"
|
||||
description = "This is a component crate of uv"
|
||||
publish = false
|
||||
|
||||
edition = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-dirs"
|
||||
version = "0.0.1"
|
||||
description = "Resolution of directories for storage of uv state"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-dispatch"
|
||||
version = "0.0.1"
|
||||
description = "Avoid cyclic crate dependencies between resolver, installer and builder"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-distribution-filename"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-distribution-types"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-distribution"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-extract"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-flags"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-fs"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-git-types"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-git"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-globfilter"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
readme = "README.md"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
[package]
|
||||
name = "uv-install-wheel"
|
||||
version = "0.0.1"
|
||||
publish = false
|
||||
description = "Takes a wheel and installs it."
|
||||
description = "This is a component crate of uv"
|
||||
keywords = ["wheel", "python"]
|
||||
|
||||
edition = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-installer"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-keyring"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-logging"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-macros"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
@ -19,5 +20,5 @@ workspace = true
|
|||
[dependencies]
|
||||
proc-macro2 = { workspace = true }
|
||||
quote = { workspace = true }
|
||||
syn = { workspace = true }
|
||||
syn = { workspace = true, features = ["full"] }
|
||||
textwrap = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-metadata"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-normalize"
|
||||
version = "0.0.1"
|
||||
description = "Normalization for distribution, package and extra names."
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-once-map"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-options-metadata"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-pep440"
|
||||
version = "0.7.0"
|
||||
description = "A library for python version numbers and specifiers, implementing PEP 440"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
license = "Apache-2.0 OR BSD-2-Clause"
|
||||
include = ["/src", "Changelog.md", "License-Apache", "License-BSD", "Readme.md", "pyproject.toml"]
|
||||
edition = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "uv-pep508"
|
||||
version = "0.6.0"
|
||||
description = "A library for python dependency specifiers, better known as PEP 508"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
include = ["/src", "Changelog.md", "License-Apache", "License-BSD", "Readme.md", "pyproject.toml"]
|
||||
license = "Apache-2.0 OR BSD-2-Clause"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
|
||||
dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.169"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
||||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemalloc-sys"
|
||||
version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemallocator"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"tikv-jemalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uv-performance-memory-allocator"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"mimalloc",
|
||||
"tikv-jemallocator",
|
||||
]
|
||||
|
|
@ -1,8 +1,14 @@
|
|||
[package]
|
||||
name = "uv-performance-memory-allocator"
|
||||
version = "0.1.0"
|
||||
publish = false
|
||||
edition = "2024"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-platform-tags"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-platform"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-preview"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-publish"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-pypi-types"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-python"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-redacted"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-requirements-txt"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-requirements"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-resolver"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[package]
|
||||
name = "uv-scripts"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
description = "Parse PEP 723-style Python scripts."
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-settings"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[package]
|
||||
name = "uv-shell"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
description = "Utilities for detecting and manipulating shell environments"
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-small-str"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-state"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-static"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-tool"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-torch"
|
||||
version = "0.1.0"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
[package]
|
||||
name = "uv-trampoline-builder"
|
||||
version = "0.0.1"
|
||||
publish = false
|
||||
description = "Builds launchers for `uv-trampoline`"
|
||||
description = "This is a component crate of uv"
|
||||
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-types"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-version"
|
||||
version = "0.9.10"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
[package]
|
||||
name = "uv-virtualenv"
|
||||
version = "0.0.4"
|
||||
publish = false
|
||||
description = "virtualenv creation implemented in rust"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
keywords = ["virtualenv", "venv", "python"]
|
||||
|
||||
edition = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-warnings"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv-workspace"
|
||||
version = "0.0.1"
|
||||
description = "This is a component crate of uv"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "uv"
|
||||
version = "0.9.10"
|
||||
description = "A Python package and project manager"
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
|
@ -40,7 +41,7 @@ uv-logging = { workspace = true }
|
|||
uv-normalize = { workspace = true }
|
||||
uv-pep440 = { workspace = true }
|
||||
uv-pep508 = { workspace = true }
|
||||
uv-performance-memory-allocator = { path = "../uv-performance-memory-allocator", optional = true }
|
||||
uv-performance-memory-allocator = { workspace = true, optional = true }
|
||||
uv-platform = { workspace = true }
|
||||
uv-platform-tags = { workspace = true }
|
||||
uv-preview = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ build-local-artifacts = false
|
|||
# Local artifacts jobs to run in CI
|
||||
local-artifacts-jobs = ["./build-binaries", "./build-docker"]
|
||||
# Publish jobs to run in CI
|
||||
publish-jobs = ["./publish-pypi"]
|
||||
publish-jobs = ["./publish-pypi", "./publish-crates"]
|
||||
# Post-announce jobs to run in CI
|
||||
post-announce-jobs = ["./publish-docs"]
|
||||
# Custom permissions for GitHub Jobs
|
||||
|
|
@ -65,11 +65,7 @@ github-custom-job-permissions = { "build-docker" = { packages = "write", content
|
|||
# Whether to install an updater program
|
||||
install-updater = false
|
||||
# Path that installers should place binaries in
|
||||
install-path = [
|
||||
"$XDG_BIN_HOME/",
|
||||
"$XDG_DATA_HOME/../bin",
|
||||
"~/.local/bin"
|
||||
]
|
||||
install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]
|
||||
|
||||
[dist.github-custom-runners]
|
||||
global = "depot-ubuntu-latest-4"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,22 @@ uv to reach this milestone.
|
|||
|
||||
uv's changelog can be [viewed on GitHub](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md).
|
||||
|
||||
## Crate versioning
|
||||
|
||||
uv's crates are published to [crates.io](https://crates.io). The following crates follow the normal
|
||||
uv versioning policy:
|
||||
|
||||
- `uv`
|
||||
- `uv-build`
|
||||
- `uv-version`
|
||||
|
||||
The `uv` and `uv-build` crates are versioned by the binary command-line interface. The Rust
|
||||
interface of these crates does not follow semantic versioning.
|
||||
|
||||
The remainder of uv's crates provide **no stability guarantees**. The Rust interface is considered
|
||||
internal and unstable. Consequently, they are versioned as `0.0.x`. The patch version is incremented
|
||||
on every uv release, regardless of changes to the crate.
|
||||
|
||||
## Cache versioning
|
||||
|
||||
Cache versions are considered internal to uv, and so may be changed in a minor or patch release. See
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
# Naively increment the patch version of each crate in the workspace.
|
||||
#
|
||||
# This excludes crates which are versioned as binaries.
|
||||
#
|
||||
# After incrementing the version in each member `Cargo.toml`, it updates the version pins in the
|
||||
# root `Cargo.toml` to match.
|
||||
|
||||
# /// script
|
||||
# requires-python = ">=3.14"
|
||||
# dependencies = []
|
||||
# ///
|
||||
|
||||
|
||||
import json
|
||||
import pathlib
|
||||
import subprocess
|
||||
import tomllib
|
||||
|
||||
NO_BUMP_CRATES = {"uv", "uv-build", "uv-version"}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
result = subprocess.run(
|
||||
["cargo", "metadata", "--format-version", "1"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
)
|
||||
content = json.loads(result.stdout)
|
||||
packages = {package["id"]: package for package in content["packages"]}
|
||||
|
||||
workspace_manifest = pathlib.Path(content["workspace_root"]) / "Cargo.toml"
|
||||
workspace_manifest_contents = workspace_manifest.read_text()
|
||||
parsed_workspace_manifest = tomllib.loads(workspace_manifest_contents)
|
||||
|
||||
version_changes = {}
|
||||
|
||||
for workspace_member in content["workspace_members"]:
|
||||
manifest = pathlib.Path(packages[workspace_member]["manifest_path"])
|
||||
name = packages[workspace_member]["name"]
|
||||
|
||||
# For the members we're not bumping, we'll still make sure that the version pinned in the
|
||||
# workspace manifest matches the version of the crate. This is done because Rooster isn't
|
||||
# Cargo workspace aware and won't otherwise bump these when updating the member `Cargo.toml`
|
||||
# files. We could make Rooster smarter instead of this.
|
||||
if name in NO_BUMP_CRATES:
|
||||
manifest_dependency = parsed_workspace_manifest["workspace"][
|
||||
"dependencies"
|
||||
].get(name)
|
||||
if manifest_dependency is None:
|
||||
continue
|
||||
manifest_version = manifest_dependency["version"]
|
||||
metadata_version = packages[workspace_member]["version"]
|
||||
if manifest_version != metadata_version:
|
||||
version_changes[name] = (manifest_version, metadata_version)
|
||||
continue
|
||||
|
||||
# For other members, bump the patch version
|
||||
version = packages[workspace_member]["version"]
|
||||
version_parts = [int(part) for part in version.split(".")]
|
||||
new_version = f"{version_parts[0]}.{version_parts[1]}.{version_parts[2] + 1}"
|
||||
|
||||
contents = manifest.read_text()
|
||||
contents = contents.replace(
|
||||
'version = "' + version + '"',
|
||||
'version = "' + new_version + '"',
|
||||
1,
|
||||
)
|
||||
|
||||
version_changes[name] = (version, new_version)
|
||||
manifest.write_text(contents)
|
||||
|
||||
# Update all the pins in the workspace root
|
||||
for name, (old_version, new_version) in version_changes.items():
|
||||
workspace_manifest_contents = workspace_manifest_contents.replace(
|
||||
f'{name} = {{ version = "{old_version}"',
|
||||
f'{name} = {{ version = "{new_version}"',
|
||||
)
|
||||
|
||||
workspace_manifest.write_text(workspace_manifest_contents)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -13,5 +13,8 @@ cd "$project_root"
|
|||
# Update the changelog
|
||||
uvx --python 3.12 rooster@0.1.1 release "$@"
|
||||
|
||||
# Bump library crate versions
|
||||
uv run "$project_root/scripts/bump-workspace-crate-versions.py"
|
||||
|
||||
echo "Updating lockfile..."
|
||||
cargo update -p uv
|
||||
|
|
|
|||
Loading…
Reference in New Issue