astral-sh / uv

An extremely fast Python package installer and resolver, written in Rust.
https://astral.sh/
Apache License 2.0
14.9k stars 421 forks source link

Support `xz` compressed source packages #2187

Open lengau opened 4 months ago

lengau commented 4 months ago

Example failure:

$ uv pip install 'python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.7.6/python-apt_2.7.6.tar.xz'
error: Failed to download and build: python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.7.6/python-apt_2.7.6.tar.xz
  Caused by: Failed to extract source distribution
  Caused by: Unsupported archive type: python-apt_2.7.6.tar.xz

This is probably low priority, I'm sure.

charliermarsh commented 4 months ago

Interesting, does pip support it?

lengau commented 4 months ago

It does - I haven't looked at how pip extracts source distributions in tarballs, but I'm guessing it does so through the tarfile module, which supports gz, bz2 and xz compressed tarballs, so I would guess full feature parity here would be to support all three.

charliermarsh commented 4 months ago

Sweet, thank you!