Skip to content

Commit

Permalink
Keep 'production' and 'self-update' features separate
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Sep 9, 2024
1 parent da7021d commit 5735826
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --locked --out dist --features production
args: --release --locked --out dist --features production,self-update
- name: "Test wheel"
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --locked --out dist --features production
args: --release --locked --out dist --features production,self-update
# See: https://github.com/sfackler/rust-openssl/issues/2036#issuecomment-1724324145
before-script-linux: |
# If we're running on rhel centos, install needed packages.
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
# On `aarch64`, use `manylinux: 2_28`; otherwise, use `manylinux: auto`.
manylinux: ${{ matrix.platform.arch == 'aarch64' && '2_28' || 'auto' }}
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --locked --out dist --features production
args: --release --locked --out dist --features production,self-update
- uses: uraimo/run-on-arch-action@v2
name: Test wheel
with:
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --locked --out dist --no-default-features --features production
args: --release --locked --out dist --no-default-features --features production,self-update
- uses: uraimo/run-on-arch-action@v2
if: matrix.platform.arch != 'ppc64'
name: Test wheel
Expand Down Expand Up @@ -449,7 +449,7 @@ jobs:
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --locked --out dist --no-default-features --features flate2/rust_backend --features production
args: --release --locked --out dist --no-default-features --features production,self-update
before-script-linux: |
if command -v yum &> /dev/null; then
yum update -y
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_1
args: --release --locked --out dist --features production
args: --release --locked --out dist --features production,self-update
- name: "Test wheel"
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -593,7 +593,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_1
args: ${{ matrix.platform.arch == 'ppc64le' && '--profile release-no-lto' || '--release'}} --locked --out dist --features production ${{ matrix.platform.arch == 'aarch64' && '--compatibility 2_17' || ''}}
args: ${{ matrix.platform.arch == 'ppc64le' && '--profile release-no-lto' || '--release'}} --locked --out dist --features production,self-update ${{ matrix.platform.arch == 'aarch64' && '--compatibility 2_17' || ''}}
docker-options: ${{ matrix.platform.maturin_docker_options }}
rust-toolchain: ${{ matrix.platform.toolchain || 'stable' }}
- uses: uraimo/run-on-arch-action@v2
Expand Down
27 changes: 21 additions & 6 deletions crates/uv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ uv-fs = { workspace = true }
uv-git = { workspace = true }
uv-installer = { workspace = true }
uv-normalize = { workspace = true }
uv-python = { workspace = true, features = ["schemars"]}
uv-python = { workspace = true, features = ["schemars"] }
uv-requirements = { workspace = true }
uv-resolver = { workspace = true }
uv-scripts = { workspace = true }
Expand All @@ -50,7 +50,10 @@ uv-production-flate2-backend = { path = "../uv-production-flate2-backend", optio

anstream = { workspace = true }
anyhow = { workspace = true }
axoupdater = { workspace = true, features = ["github_releases", "tokio"], optional = true }
axoupdater = { workspace = true, features = [
"github_releases",
"tokio",
], optional = true }
clap = { workspace = true, features = ["derive", "string", "wrap_help"] }
ctrlc = { workspace = true }
flate2 = { workspace = true, default-features = false }
Expand All @@ -74,7 +77,9 @@ thiserror = { workspace = true }
tokio = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }
tracing-durations-export = { workspace = true, features = ["plot"], optional = true }
tracing-durations-export = { workspace = true, features = [
"plot",
], optional = true }
tracing-subscriber = { workspace = true, features = ["json"] }
tracing-tree = { workspace = true }
unicode-width = { workspace = true }
Expand All @@ -93,18 +98,28 @@ indoc = { version = "2.0.4" }
insta = { version = "1.36.1", features = ["filters", "json"] }
predicates = { version = "3.0.4" }
regex = { workspace = true }
reqwest = { workspace = true, features = ["blocking"], default-features = false }
reqwest = { workspace = true, features = [
"blocking",
], default-features = false }
similar = { version = "2.6.0" }
tempfile = { workspace = true }
zip = { workspace = true }

[package.metadata.cargo-shear]
ignored = ["flate2", "uv-production-memory-allocator", "uv-production-flate2-backend"]
ignored = [
"flate2",
"uv-production-memory-allocator",
"uv-production-flate2-backend",
]

[features]
default = ["python", "pypi", "git"]
# Use better memory allocators, etc. — also turns-on self-update.
production = ["self-update", "production-memory-allocator", "production-flate2-backend", "uv-distribution/production"]
production = [
"production-memory-allocator",
"production-flate2-backend",
"uv-distribution/production",
]
production-memory-allocator = ["dep:uv-production-memory-allocator"]
production-flate2-backend = ["dep:uv-production-flate2-backend"]

Expand Down

0 comments on commit 5735826

Please sign in to comment.