astral-uv:pip-list-format

Last commit made on 2024-03-06
Get this branch:
git clone -b pip-list-format https://git.launchpad.net/astral-uv

Branch merges

Branch information

Name:
pip-list-format
Repository:
lp:astral-uv

Recent commits

8372b2a... by Charlie Marsh <email address hidden>

Merge branch 'main' into pip-list-format

65518c9... by Charlie Marsh <email address hidden>

Escape Windows paths with spaces in `venv` activation command (#2223)

## Summary

Ensure that we print `& "foo bar\Scripts\activate"` if necessary.

9f1bb4d... by Charlie Marsh <email address hidden>

Show appropriate activation command based on shell detection (#2221)

## Summary

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

## Test Plan

On Nushell:

```
(uv) ~/workspace/uv> cargo run venv
Using Python 3.12.0 interpreter at: /Users/crmarsh/workspace/uv/.venv/bin/python3
Creating virtualenv at: .venv
Activate with: overlay use .venv/bin/activate.nu
```

On Bash:

```
❯ cargo run venv "foo bar"
Using Python 3.12.0 interpreter at: /Users/crmarsh/.local/share/rtx/installs/python/3.12.0/bin/python3
Creating virtualenv at: foo bar
Activate with: source 'foo bar/bin/activate'
```

9e41f73... by Charlie Marsh <email address hidden>

Respect non-`sysconfig`-based system Pythons (#2193)

## Summary

`pip` uses `sysconfig` for Python 3.10 and later by default; however, it
falls back to `distutils` for earlier Python versions, and distros can
actually tell `pip` to continue falling back to `distutils` via the
`_PIP_USE_SYSCONFIG` variable.

By _always_ using `sysconfig`, we're doing the wrong then when
installing into some system Pythons, e.g., on Debian prior to Python
3.10.

This PR modifies our logic to mirror `pip` exactly, which is what's been
recommended to me as the right thing to do.

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

## Test Plan

Most notably, the new Debian tests pass here (which fail on main:
https://github.com/astral-sh/uv/pull/2144).

I also added Pyston as a second stress-test.

0f6fc11... by Charlie Marsh <email address hidden>

Query interpreter to determine correct `virtualenv` paths (#2188)

## Summary

This PR migrates our virtualenv creation from a setup that assumes prior
knowledge of the correct paths, to a technique borrowed from
`virtualenv` whereby we use `sysconfig` and `distutils` to determine the
paths. The general trick is to grab the expected paths with `sysconfig`,
then make them all relative, then make them absolute for a given
directory.

Closes #2095.
Closes #2153.

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

Pin maturin version in CI for now (#2219)

## Summary

In v1.5.0, Maturin now produces Metadata 2.3.0, which isn't supported in
the GitHub Action:
https://github.com/pypa/gh-action-pypi-publish/pull/219.

043d726... by Charlie Marsh <email address hidden>

Bump version to v0.1.15 (#2217)

34acfe4... by Charlie Marsh <email address hidden>

Respect `py --list-paths` fallback in `--python python3` invocations (#2214)

## Summary

This makes `--python python3` and `--python 3.10` more consistent on
Windows.

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

## Test Plan

Ran `cargo run venv --python python3.12` with the Windows Store Python.

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

HTML-decode URLs in HTML indexes (#2215)

## Summary

If the index lists a URL like
`https://buf.build/gen/python/hashb-foxglove-protocolbuffers-python/hashb_foxglove_protocolbuffers_python-25.3.0.1.20240226043130&#43;465630478360-py3-none-any.whl`,
we need to decode that to
`https://buf.build/gen/python/hashb-foxglove-protocolbuffers-python/hashb_foxglove_protocolbuffers_python-25.3.0.1.20240226043130+465630478360-py3-none-any.whl`.

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

01ebaef... by Charlie Marsh <email address hidden>

Avoid Windows Store shims in `--python python3`-like invocations (#2212)

## Summary

We have logic in `python_query.rs` to filter out Windows Store shims
when you use invocations like `-p 3.10`, but not `--python python3`,
which is uncommon but allowed on Windows.

Closes #2211.