A CLI tool to download wheels in parallel.
tires is a solution for mirroring packages. Tools like bandersnatch
will download every PyPI version of a package, which can be overkill if you
want only a single version of a package. bandersnatch also does not download
the dependencies. On the other hand, pip wheel downloads wheels for your
package and its dependencies, and nothing more, but the downloads are
sequential.
tires seeks to be something in the middle . tires compiles the dependencies
listed in a toml file with uv pip compile (fast/parallel due to uv),
enumerates the unique packages, then downloads and, if needed, builds the
wheels with uvx -p <python-version> pip wheel --no-deps in parallel. Multiple
versions of the same package, for different python versions, can be
downloaded. Wheels are built only for the current platform.
uv
uv tool install tirespip
pip install tiresThe following will download wheels for packages listed in manifest.toml (can
be named anything.toml) to wheels/.
tires get /path/to/manifest.toml /path/to/wheels/The manifest file is a TOML file with a [packages] table. Each package is
defined as a key under [packages] with a table of options.
versions: A list of version specifiers (strings). Each specifier can be:- An exact version (e.g.,
"1.26.4") - A version range (e.g.,
">=70,<73") - An empty string (meaning
"latest")
- An exact version (e.g.,
python: A list of Python version strings (e.g.,["3.10", "3.12"]) for which to build wheels.torch-backend: (Optional) A list of torch back ends (e.g.,["cu126", "auto"]) as supported byuv.index: (Optional) A custom package index URL.
See the examples/ directory for sample manifest files.
# Basic usage. Can specify a PyPI package name or github url.
[packages]
scipy = {} # just a package name from PyPI
'git+https://github.com/lanl/tires.git' = {} # GitHub URL to python package
# Inline specification of package versions and python versions
# The empty string triggers download of the latest numpy version.
numpy = { versions = ["2.4.1", "1.26.4", ""], python = ["3.10", "3.13"] }
# Table specification of package versions and python versions
[packages.setuptools]
versions = [">=70,<73", ">79", ">81"] # can specify versions and bounds
python = ["3.12"] # can specify python version
# Can specify torch backend, like in uv
[packages.torch]
torch-backend = ["cu126"]
python = ["3.12"]-
If
versionsis not specified, it defaults to the latest stable release version. -
If
pythonis not specified, it defaults to the Python versions provided to thetires getcommand (or the default:"3.10 3.11 3.12 3.13 3.14"). -
An empty string in
versions("") is interpreted as "latest". -
Version specifiers that do not start with an operator (like
==,>=, etc.) are treated as exact versions and will be prefixed with==. -
Git dependencies can be specified directly as a string (e.g.,
'git+https://github.com/lanl/tires.git' = {}) or as a key with options. -
The
tomlfile must not list the same package more than once. For example, the following is not allowed.numpy = { python = ["3.11"] } numpy = { python = ["3.10"] }
You must rewrite as
numpy = { python = ["3.10", "3.11"] }
However, including both
scipyandnumpyis fine, even thoughscipydepends onnumpy.
- O5084