uv/crates
konsti 673bece595
Allow pip-compile without a venv (#494)
The semantics are a bit unintuitive because `--python-version` is a
preference when looking for a python version without a venv, but if we
don't find that exact version we'll take `python3` and patch the
markers. This will make more sense once we start provisioning python
builds.

We can now resolve black with both python 3.8 and 3.12, with or without
that python version being in scope. In the example below,
`PATH=$HOME/.cargo/bin:/usr/bin` removes the pyenv builds and leaves
only `python3`, which is python 3.11.

```console
$ RUST_LOG=puffin::commands=debug cargo run --bin puffin -q -- pip-compile -v scripts/benchmarks/requirements/black.in --python-version py38
    0.004108s DEBUG puffin::commands::pip_compile Using Python 3.8 at /home/konsti/.local/bin/python3.8
Resolved 8 packages in 44ms
# This file was autogenerated by Puffin v0.0.1 via the following command:
#    puffin pip-compile -v scripts/benchmarks/requirements/black.in --python-version py38
black==23.11.0
[...]
platformdirs==4.0.0
    # via black
tomli==2.0.1
    # via black
typing-extensions==4.8.0
    # via black
$ PATH=$HOME/.cargo/bin:/usr/bin RUST_LOG=puffin::commands=debug cargo run --bin puffin -q -- pip-compile -v scripts/benchmarks/requirements/black.in --python-version py38
    0.004315s DEBUG puffin::commands::pip_compile Using Python 3.11 at /usr/bin/python3
Resolved 8 packages in 43ms
# This file was autogenerated by Puffin v0.0.1 via the following command:
#    puffin pip-compile -v scripts/benchmarks/requirements/black.in --python-version py38
black==23.11.0
[...]
platformdirs==4.0.0
    # via black
tomli==2.0.1
    # via black
typing-extensions==4.8.0
    # via black
```

```console
$ RUST_LOG=puffin::commands=debug cargo run --bin puffin -q -- pip-compile -v scripts/benchmarks/requirements/black.in --python-version py312
    0.004216s DEBUG puffin::commands::pip_compile Using Python 3.12 at /home/konsti/.local/bin/python3.12
Resolved 6 packages in 37ms
# This file was autogenerated by Puffin v0.0.1 via the following command:
#    puffin pip-compile -v scripts/benchmarks/requirements/black.in --python-version py312
black==23.11.0
[...]
platformdirs==4.0.0
    # via black
$ PATH=$HOME/.cargo/bin:/usr/bin RUST_LOG=puffin::commands=debug cargo run --bin puffin -q -- pip-compile -v scripts/benchmarks/requirements/black.in --python-version py312
    0.004190s DEBUG puffin::commands::pip_compile Using Python 3.11 at /usr/bin/python3
Resolved 6 packages in 39ms
# This file was autogenerated by Puffin v0.0.1 via the following command:
#    puffin pip-compile -v scripts/benchmarks/requirements/black.in --python-version py312
black==23.11.0
[...]
platformdirs==4.0.0
    # via black
```

Fixes #235.

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-01-05 15:01:06 +00:00
..
bench Use Clippy lint table over Cargo config (#490) 2023-11-22 15:10:27 +00:00
cache-key Split puffin-cache into Puffin-specific and generic utilities (#728) 2023-12-25 14:38:56 +00:00
distribution-filename Add support for HTML indexes (#719) 2023-12-24 16:04:00 +00:00
distribution-types Delete unused file (#772) 2024-01-04 11:32:12 +00:00
gourgeist Cache Tags on Interpreter (#726) 2023-12-25 13:41:10 +00:00
install-wheel-rs Add a dedicated error for missing RECORD files (#762) 2024-01-04 00:28:50 +00:00
pep440-rs pep440: some minor refactoring, mostly around error types (#780) 2024-01-04 12:28:36 -05:00
pep508-rs pep440: some minor refactoring, mostly around error types (#780) 2024-01-04 12:28:36 -05:00
platform-host Error when ldd is not in path (#506) 2023-11-28 05:55:04 +00:00
platform-tags Cache Tags on Interpreter (#726) 2023-12-25 13:41:10 +00:00
puffin-build Explain ld errors (#773) 2024-01-04 20:56:38 +01:00
puffin-cache Change internal representation of CacheEntry to avoid allocations (#730) 2023-12-26 02:10:30 +00:00
puffin-cli Allow pip-compile without a venv (#494) 2024-01-05 15:01:06 +00:00
puffin-client pep440: some minor refactoring, mostly around error types (#780) 2024-01-04 12:28:36 -05:00
puffin-dev Model Python version as a PubGrub package (#745) 2024-01-03 15:20:45 +00:00
puffin-dispatch Model Python version as a PubGrub package (#745) 2024-01-03 15:20:45 +00:00
puffin-distribution Add spans to all significant tasks (#740) 2024-01-02 16:17:03 +00:00
puffin-extract Move source dist extraction into extract crate (#649) 2023-12-14 05:56:49 +00:00
puffin-fs Show resource and lockfile when waiting (#715) 2023-12-21 00:05:49 +01:00
puffin-git Split puffin-cache into Puffin-specific and generic utilities (#728) 2023-12-25 14:38:56 +00:00
puffin-installer Add context and diagnostics for missing METADATA (#761) 2024-01-03 19:09:23 -05:00
puffin-interpreter Allow pip-compile without a venv (#494) 2024-01-05 15:01:06 +00:00
puffin-normalize Add dedicated ID types to avoid opaque strings (#642) 2023-12-14 00:53:33 +00:00
puffin-resolver Cancel waiting tasks on resolution error (#753) 2024-01-03 20:18:27 +00:00
puffin-traits Cancel waiting tasks on resolution error (#753) 2024-01-03 20:18:27 +00:00
puffin-warnings Rename puffin-warnings macros to avoid tracing collision (#694) 2023-12-18 21:33:21 +00:00
puffin-workspace Use Clippy lint table over Cargo config (#490) 2023-11-22 15:10:27 +00:00
pypi-types pep440: some minor refactoring, mostly around error types (#780) 2024-01-04 12:28:36 -05:00
requirements-txt Show fully-resolved URLs in non-resolution contexts (#689) 2023-12-18 22:10:24 +00:00
README.md Split puffin-cache into Puffin-specific and generic utilities (#728) 2023-12-25 14:38:56 +00:00

Crates

bench

Functionality for benchmarking Puffin.

cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

gourgeist

A venv replacement to create virtual environments in Rust.

install-wheel-rs

Install built distributions (wheels) into a virtual environment.]

pep440-rs

Utilities for interacting with Python version numbers and specifiers.

pep508-rs

Utilities for interacting with PEP 508 dependency specifiers.

platform-host

Functionality for detecting the current platform (operating system, architecture, etc.).

platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

puffin-build

A PEP 517-compatible build frontend for Puffin.

puffin-cache

Functionality for caching Python packages and associated metadata.

puffin-cli

Command-line interface for the Puffin package manager.

puffin-client

Client for interacting with PyPI-compatible HTTP APIs.

puffin-dev

Development utilities for Puffin.

puffin-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in puffin-traits.

puffin-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

puffin-extract

Utilities for extracting files from archives.

puffin-fs

Utilities for interacting with the filesystem.

puffin-git

Functionality for interacting with Git repositories.

puffin-installer

Functionality for installing Python packages into a virtual environment.

puffin-interpreter

Functionality for detecting and leveraging the current Python interpreter.

puffin-normalize

Normalize package and extra names as per Python specifications.

puffin-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

puffin-resolver

Functionality for resolving Python packages and their dependencies.

puffin-traits

Shared traits for Puffin, to avoid circular dependencies.

pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

puffin-warnings

User-facing warnings for Puffin.

requirements-txt

Functionality for parsing requirements.txt files.