astral-uv:charlie/default

Last commit made on 2024-03-26
Get this branch:
git clone -b charlie/default https://git.launchpad.net/astral-uv

Branch merges

Branch information

Name:
charlie/default
Repository:
lp:astral-uv

Recent commits

e190443... by Charlie Marsh <email address hidden>

Create virtualenv by default in pip install and pip sync

39769d8... by Charlie Marsh <email address hidden>

Fall back to PEP 517 hooks for non-compliant PEP 621 metadata (#2662)

If you pass a `pyproject.toml` that use Hatch's context formatting API,
we currently fail because the dependencies aren't valid under PEP 508.
This PR makes the static metadata parsing a little more relaxed, so that
we appropriately fall back to PEP 517 there.

12846c2... by Charlie Marsh <email address hidden>

Disallow `pyproject.toml` from `pip uninstall` (#2663)

## Summary

Passing `pyproject.toml` or `setup.py` to `pip uninstall` is a bit
strange, since it will often require running a resolution to resolve the
dependencies (e.g., build the project), which means we also need to
accept `--index-url` and friends.

5270624... by Charlie Marsh <email address hidden>

Avoid `prepare_metadata_for_build_wheel` calls for Hatch packages with dynamic dependencies (#2645)

## Summary

Hatch allows for highly dynamic customization of metadata via hooks. In
such cases, Hatch
can't upload the PEP 517 contract, in that the metadata Hatch would
return by
`prepare_metadata_for_build_wheel` isn't guaranteed to match that of the
built wheel.

Hatch disables `prepare_metadata_for_build_wheel` entirely for pip.
We'll instead disable
it on our end when metadata is defined as "dynamic" in the
pyproject.toml, which should
allow us to leverage the hook in _most_ cases while still avoiding
incorrect metadata for
the remaining cases.

Closes: https://github.com/astral-sh/uv/issues/2130.

786598b... by konstin

Add fast build profile without debuginfo (#2628)

Add a compile option `-p fast-build` for a 16% incremental compile
speedup (linux) at the cost of having no debuginfo.

After trying various rust compiler speedup suggestions, setting mold as
my default linker and removing debuginfo are the only ones showing a
speedup.

```
hyperfine --warmup 1 --runs 3 --prepare "touch crates/uv-resolver/src/resolver/mod.rs" \
    "cargo +nightly build --bin uv" \
    "cargo +nightly build --bin uv --profile fast-build"
Benchmark 1: cargo +nightly build --bin uv
  Time (mean ± σ): 1.569 s ± 0.008 s [User: 1.179 s, System: 0.369 s]
  Range (min … max): 1.560 s … 1.576 s 3 runs

Benchmark 2: cargo +nightly build --bin uv --profile fast-build
  Time (mean ± σ): 1.353 s ± 0.020 s [User: 1.109 s, System: 0.301 s]
  Range (min … max): 1.338 s … 1.375 s 3 runs

Summary
  cargo +nightly build --bin uv --profile fast-build ran
    1.16 ± 0.02 times faster than cargo +nightly build --bin uv
```

ae35a21... by Charlie Marsh <email address hidden>

Accept `setup.py` and `setup.cfg` files in compile (#2634)

## Summary

This costs us ~nothing now that we support using PEP 517 hooks for
`pyproject.toml`.

## Test Plan

`cargo test`

71428f7... by Charlie Marsh <email address hidden>

Use PEP 517 to extract non-static `pyproject.toml` metadata (#2633)

## Summary

When a user passes a `pyproject.toml` to `pip compile` (e.g., `uv pip
compile pyproject.toml`), we extract the requirements from the
`pyproject.toml` directly. However... that isn't always possible (as
seen in the linked issues). When it's _not_, we instead need to run the
PEP 517 build hooks to identify the metadata.

Closes https://github.com/astral-sh/uv/issues/1624.

Closes https://github.com/astral-sh/uv/issues/1644.

## Test Plan

`cargo test`

f375334... by Charlie Marsh <email address hidden>

Add `rustc-hash` to `uv` crate (#2660)

## Summary

This is required as of https://github.com/astral-sh/uv/pull/2589, but
isn't a direct dependency. I'm not sure how that PR passed CI exactly.

6d7b2c7... by eth3lbert <email address hidden>

`Editable project location` and `Required-by` for `pip show` (#2589)

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

- Displays missing packages as single-line warnings.
- Adds support for `Editable project location` and `Required-by` fields
in `pip show`.

Part of #2526.

4de3820... by Alex Waygood <email address hidden>

Renovate: only look for cargo dependencies in the `crates/` directory (#2659)