Commit Graph

201 Commits

Author SHA1 Message Date
Zanie Blue bcbcd0a1e5 Bump version to 0.6.5 (#12018) 2025-03-06 14:39:23 -06:00
konsti bf4c7afe8b A minimal build backend for uv: uv_build (#11446)
uv itself is a large package with many dependencies and lots of
features. To build a package using the uv build backend, you shouldn't
have to download and install the entirety of uv. For platform where we
don't provide wheels, it should be possible and fast to compile the uv
build backend. To that end, we're introducing a python package that
contains a trimmed down version of uv that only contains the build
backend, with a minimal dependency tree in rust.

The `uv_build` package is publish from CI just like uv itself. It is
part of the workspace, but has much less dependencies for its own
binary. We're using cargo deny to enforce that the network stack is not
part of the dependencies. A new build profile ensure we're getting the
minimum possible binary size for a rust binary.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-03-06 13:27:20 -06:00
Zanie Blue f0ec9fd44a Bump version to 0.6.4 (#11934) 2025-03-03 16:04:11 -06:00
Charlie Marsh c3d809d276 Migrate to zlib-rs (again) (#11894)
## Summary

I believe `zlib-rs` is now a better choice on ARM and x86, so I'm just
going to assume it's a better choice everywhere. It's much easier to
build (removes our CMake dependency), and in my benchmarking, it's
substantially faster on ARM and faster or ~exactly even on my x86
Windows machine.

We migrated to `zlib-rs` once before (#9184); however, I later reverted
it as I learned that they were only doing compile-time feature
detection, and so `zlib-rs` was meaningfully slower on x86. They now
perform runtime feature detection:
https://trifectatech.org/blog/zlib-rs-is-faster-than-c/.

To benchmark, I wrote a script to create a local Simple API-compliant
registry (see the commit history) for a single package. Then I ran the
`install-cold` benchmark against that registry to install NumPy.

On ARM:

```
❯ uv run resolver --uv-pip-path ../../zlib-ng --uv-pip-path ../../zlib-rs \
        --benchmark install-cold \
        req.txt --warmup 10 --min-runs 30
Benchmark 1: ../../zlib-ng (install-cold)
  Time (mean ± σ):     165.7 ms ±  34.7 ms    [User: 64.4 ms, System: 93.2 ms]
  Range (min … max):   141.8 ms … 293.2 ms    30 runs

Benchmark 2: ../../zlib-rs (install-cold)
  Time (mean ± σ):     150.9 ms ±  16.2 ms    [User: 57.4 ms, System: 86.4 ms]
  Range (min … max):   135.3 ms … 202.4 ms    30 runs

Summary
  ../../zlib-rs (install-cold) ran
    1.10 ± 0.26 times faster than ../../zlib-ng (install-cold)
```

I benchmarked this about 100 times on my Windows machine and found it
difficult to conclude anything beyond "They're nearly the same". Here's
an example:

```
PS C:\Users\crmar\workspace\puffin> hyperfine --prepare "uv venv" "zlib-rs.exe pip sync ./scripts/benchmark/req.txt" "zlib-ng.exe pip sync ./scripts/benchmark/req.txt" "zlib-rs.exe pip sync ./scripts/benchmark/req.txt" "zlib-ng.exe pip sync ./scripts/benchmark/req.txt" --runs 10 --warmup 5
Benchmark 1: zlib-rs.exe pip sync ./scripts/benchmark/req.txt
  Time (mean ± σ):     240.6 ms ±  10.8 ms    [User: 6.1 ms, System: 92.2 ms]
  Range (min … max):   229.4 ms … 267.9 ms    10 runs

Benchmark 2: zlib-ng.exe pip sync ./scripts/benchmark/req.txt
  Time (mean ± σ):     241.3 ms ±   6.2 ms    [User: 7.7 ms, System: 90.6 ms]
  Range (min … max):   233.9 ms … 252.1 ms    10 runs

Benchmark 3: zlib-rs.exe pip sync ./scripts/benchmark/req.txt
  Time (mean ± σ):     242.8 ms ±   7.7 ms    [User: 6.2 ms, System: 23.4 ms]
  Range (min … max):   236.1 ms … 262.8 ms    10 runs

Benchmark 4: zlib-ng.exe pip sync ./scripts/benchmark/req.txt
  Time (mean ± σ):     245.9 ms ±   5.7 ms    [User: 1.5 ms, System: 59.4 ms]
  Range (min … max):   240.9 ms … 257.3 ms    10 runs

Summary
  zlib-rs.exe pip sync ./scripts/benchmark/req.txt ran
    1.00 ± 0.05 times faster than zlib-ng.exe pip sync ./scripts/benchmark/req.txt
    1.01 ± 0.06 times faster than zlib-rs.exe pip sync ./scripts/benchmark/req.txt
    1.02 ± 0.05 times faster than zlib-ng.exe pip sync ./scripts/benchmark/req.txt
```

Closes #11885.
2025-03-03 17:29:31 +00:00
Aria Desires a0b9f22a21 Bump version to 0.6.3 (#11759) 2025-02-24 17:25:01 -05:00
Zanie Blue 6d3614eece Bump version to 0.6.2 (#11630) 2025-02-19 13:11:11 -06:00
Zanie Blue c91ee82a82 Bump version to 0.6.1 (#11580) 2025-02-17 11:57:47 -06:00
Zanie Blue 591f38c25e Bump version to v0.6.0 (#11496)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-02-14 11:55:54 -06:00
Zanie Blue e38ac4900d Bump version to 0.5.31 (#11459) 2025-02-12 14:45:22 -06:00
Charlie Marsh ca49495e4b Bump version to v0.5.30 (#11405) 2025-02-10 21:42:31 +00:00
Zanie Blue 67e2f904ed Add Discord to PyPI project URLs (#11286)
Referencing
https://daniel.feldroy.com/posts/2023-08-pypi-project-urls-cheatsheet


https://github.com/pypi/warehouse/blob/70eac9796fa1eae24741525688a112586eab9010/warehouse/templates/packaging/detail.html#L38-L39
2025-02-06 16:47:23 -06:00
Zanie Blue ca73c47543 Bump version to 0.5.29 (#11267) 2025-02-05 19:59:29 -05:00
Charlie Marsh fea00dcdd5 Bump version to v0.5.28 (#11228) 2025-02-04 20:28:43 -05:00
Zanie Blue 73e9928d40 Bump version to 0.5.27 (#11201) 2025-02-03 16:55:36 -06:00
Zanie Blue 5ef3d51390 Bump version to 0.5.26 (#11119) 2025-01-30 15:37:00 -06:00
Zanie Blue 9c07c3fc5b Bump version to 0.5.25 (#11042) 2025-01-28 15:40:43 -06:00
Zanie Blue 42fae925c4 Bump version to 0.5.24 (#10922) 2025-01-23 17:26:59 -06:00
Charlie Marsh ba42467f1b Bump version to v0.5.23 (#10879) 2025-01-23 00:26:10 +00:00
Charlie Marsh 4574ced370 Bump version to v0.5.22 (#10829) 2025-01-21 17:03:55 -05:00
Charlie Marsh 3478c068bb Bump version to v0.5.21 (#10723) 2025-01-17 20:53:36 +00:00
Charlie Marsh 1c17662b37 Bump version to v0.5.20 (#10659) 2025-01-15 23:18:06 +00:00
Zanie Blue a7f13e0e0b Bump version to 0.5.19 (#10643) 2025-01-15 20:56:43 +00:00
Charlie Marsh 27d1bad550 Bump version to v0.5.18 (#10499) 2025-01-11 14:38:26 +00:00
Charlie Marsh c198e2233e Bump version to v0.5.17 (#10480) 2025-01-10 15:52:56 -05:00
Charlie Marsh 333f03f112 Bump version to v0.5.16 (#10395) 2025-01-08 10:29:32 -05:00
Charlie Marsh 4c0922ee1b Add AWS Lambda integration guide (#10278)
## Summary

This includes instructions to:

- Deploy a standalone application.
- Deploy an application that depends on local libraries (a workspace).
- Deploy via Docker.
- Deploy via zip.

There's an accompanying Git repository here:
https://github.com/astral-sh/uv-aws-lambda-example.

Closes https://github.com/astral-sh/uv/issues/8935.
2025-01-07 13:50:31 -05:00
Zanie Blue eb6ad9a4fa Bump version to 0.5.15 (#10337) 2025-01-06 18:04:25 -06:00
Charlie Marsh 9f1ba2b967 Bump version to v0.5.14 (#10279) 2025-01-02 14:31:04 -05:00
Charlie Marsh 4c49683f7b Bump version to v0.5.13 (#10188) 2024-12-26 23:58:13 +00:00
Charlie Marsh 351d602d86 Bump version to v0.5.12 (#10175) 2024-12-26 14:16:19 -05:00
Zanie Blue c4d0caaee5 Bump version to 0.5.11 (#10044) 2024-12-19 18:01:45 -06:00
konsti cb325e2e2f metadata_directory already contains dist-info directory (#10005)
From PEP 517:

```python
def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):
    ...
```

> Must create a .dist-info directory containing wheel metadata inside
the specified metadata_directory (i.e., creates a directory like
{metadata_directory}/{package}-{version}.dist-info/).

```python
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
    ...
```

> If the build frontend has previously called
prepare_metadata_for_build_wheel and depends on the wheel resulting from
this call to have metadata matching this earlier call, then it should
provide the path to the created .dist-info directory as the
metadata_directory argument.

Notice that the `metadata_directory` is different for the both hooks:
For `prepare_metadata_for_build_wheel` is doesn't contain the
`.dist-info` directory as final segment, for `build_wheel` it does.

Previously, the code assumed that both directories didn't contain the
`.dist-info` for both cases.

Checked with:

```
maturin build
uv init test-uv-build-backend --build-backend uv
cd test-uv-build-backend
uv build --sdist --preview
cd ..
UV_PREVIEW=1 pip install test-uv-build-backend/dist/test_uv_build_backend-0.1.0.tar.gz --no-index --find-links target/wheels/ -v --no-cache-dir
```

Fixes #9969
2024-12-18 20:14:08 +01:00
Zanie Blue 37b11ddb22 Bump version to 0.5.10 (#9983) 2024-12-17 14:53:19 -06:00
Charlie Marsh 0652800cb0 Bump version to v0.5.9 (#9889) 2024-12-13 17:28:19 -05:00
Zanie Blue 80d41671bc Bump version to 0.5.8 (#9791) 2024-12-11 15:18:51 +00:00
Zanie Blue 3ca155ddd6 Bump version to 0.5.7 (#9698) 2024-12-06 17:50:21 -06:00
Zanie Blue 59460b8a7c Bump version to 0.5.6 (#9612) 2024-12-03 14:13:06 -06:00
Zanie Blue 95cd8b8b3f Bump version to 0.5.5 (#9478) 2024-11-27 11:37:39 -06:00
Charlie Marsh c62c83c37a Bump version to v0.5.4 (#9290) 2024-11-20 16:01:24 -05:00
Charlie Marsh 56d3622087 Bump version to v0.5.3 (#9229) 2024-11-19 18:53:54 +00:00
Zanie Blue 7e36bc1f54 Include trampolines in sdist on Windows (#9172)
Naive fix for

```
         Compiling uv-trampoline-builder v0.0.1 (C:\Users\...\AppData\Local\uv\cache\sdists-v6\pypi\uv\0.5.2\9xswF03fJ5dr3vH_iowkm\src\crates\uv-trampoline-builder)
      error: couldn't read `crates\uv-trampoline-builder\src\../../uv-trampoline/trampolines/uv-trampoline-x86_64-gui.exe`: The system cannot find the path specified. (os error 3)
        --> crates\uv-trampoline-builder\src\lib.rs:21:5
         |
      21 |     include_bytes!("../../uv-trampoline/trampolines/uv-trampoline-x86_64-gui.exe");
         |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

Closes: https://github.com/astral-sh/uv/issues/9138.
2024-11-17 20:47:25 -05:00
Zanie Blue 195f4b634f Bump version to 0.5.2 (#9133) 2024-11-14 15:59:50 -06:00
Zanie Blue 65e2f955f1 Update uv development status classifier to "Stable" on PyPI (#8943)
Closes https://github.com/astral-sh/uv/issues/8941
2024-11-08 21:21:00 -05:00
Zanie Blue f399a52719 Bump to 0.5.1 (#8959) 2024-11-08 17:15:28 -06:00
Zanie Blue 8d665267cd Bump version to 0.5.0 (#8899)
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2024-11-07 22:38:25 +00:00
Zanie Blue 61ed2a236a Bump version to 0.4.30 (#8820) 2024-11-04 18:52:57 -06:00
Zanie Blue 85f9a0d0ec Bump version to 0.4.29 (#8711) 2024-10-30 18:22:53 -05:00
Zanie Blue 4c82561488 Bump version to 0.4.28 (#8648) 2024-10-28 16:38:59 -05:00
Zanie Blue 4727acbc62 Bump version to 0.4.27 (#8573) 2024-10-25 19:06:06 +00:00
Charlie Marsh 1b9b9d56b3 Bump version to v0.4.26 (#8508) 2024-10-23 15:17:49 -04:00