Commit Graph

15 Commits

Author SHA1 Message Date
Charlie Marsh
17228ba04e Add support for path dependencies (#471)
## Summary

This PR adds support for local path dependencies. The approach mostly
just falls out of our existing approach and infrastructure for Git and
URL dependencies.

Closes https://github.com/astral-sh/puffin/issues/436. (We'll open a
separate issue for editable installs.)

## Test Plan

Added `pip-compile` tests that pre-download a wheel or source
distribution, then install it via local path.
2023-11-21 11:49:42 +00:00
Charlie Marsh
13ba4405aa Update README and crates manifest (#419) 2023-11-14 01:20:07 +00:00
Charlie Marsh
4eed03d8e7 Update README limitations (#363) 2023-11-08 03:01:33 +00:00
Charlie Marsh
e15b99b911 Rename commands to pip-sync and pip-compile (#123)
To free up the rest of the interface.
2023-10-18 21:15:20 +00:00
Charlie Marsh
239b5893d8 Fix version satisfier for unpinned dependencies (#74) 2023-10-09 11:48:39 -04:00
Charlie Marsh
75cb7a0178 Add benchmark scripts (#69)
Moving these out of the README and into proper scripts.
2023-10-08 23:37:38 +00:00
Charlie Marsh
2a846e76b7 Store unzipped wheels in a cache (#49)
This PR massively speeds up the case in which you need to install wheels
that already exist in the global cache.

The new strategy is as follows:

- Download the wheel into the content-addressed cache.
- Unzip the wheel into the cache, but ignore content-addressing. It
turns out that writing to `cacache` for every file in the zip added a
ton of overhead, and I don't see any actual advantages to doing so.
Instead, we just unzip the contents into a directory at, e.g.,
`~/.cache/puffin/django-4.1.5`.
- (The unzip itself is now parallelized with Rayon.)
- When installing the wheel, we now support unzipping from a directory
instead of a zip archive. This required duplicating and tweaking a few
functions.
- When installing the wheel, we now use reflinks (or copy-on-write
links). These have a few fantastic properties: (1) they're extremely
cheap to create (on macOS, they are allegedly faster than hard links);
(2) they minimize disk space, since we avoid copying files entirely in
the vast majority of cases; and (3) if the user then edits a file
locally, the cache doesn't get polluted. Orogene, Bun, and soon pnpm all
use reflinks.

Puffin is now ~15x faster than `pip` for the common case of installing
cached data into a fresh environment.

Closes https://github.com/astral-sh/puffin/issues/21.

Closes https://github.com/astral-sh/puffin/issues/39.
2023-10-08 04:04:48 +00:00
Charlie Marsh
a46887d34b Add motivation to README (#47) 2023-10-07 23:39:56 +00:00
Charlie Marsh
9be02d1590 Skip already-installed dependencies during sync command (#43)
Closes https://github.com/astral-sh/puffin/issues/35.
2023-10-07 19:26:45 +00:00
Charlie Marsh
f14b1f0c95 Update benchmark command in README (#40) 2023-10-07 14:32:25 +00:00
Charlie Marsh
162952bf64 Add a content-addressed cache for wheels (#38)
Closes https://github.com/astral-sh/puffin/issues/4.
2023-10-07 14:24:52 +00:00
Charlie Marsh
dd26cfa0cc Migrate to tokio (#27)
Closes https://github.com/astral-sh/puffin/issues/26.
2023-10-06 20:31:03 +00:00
Charlie Marsh
dab70a661a Change install to sync (with sync semantics) (#24)
For better separate at this stage (and following `pip-tools`), it's now
`puffin sync`, and it assumes `--no-deps`.
2023-10-06 19:42:58 +00:00
Charlie Marsh
f395c9c98c Update README 2023-10-06 01:03:07 -04:00
Charlie Marsh
d226e0a2cd Add README and LICENSE files 2023-10-05 12:45:38 -04:00