3 releases

0.1.3 Sep 9, 2024
0.1.2 Aug 25, 2024
0.1.1 Aug 24, 2024

#832 in Development tools

Download history 214/week @ 2024-08-19 51/week @ 2024-08-26 120/week @ 2024-09-09 66/week @ 2024-09-16 40/week @ 2024-09-23 63/week @ 2024-09-30 9/week @ 2024-10-07 7/week @ 2024-10-14

123 downloads per month

Custom license

12KB
169 lines

Rye ➡️ Uv

Since v0.3.0, uv can now handle python projects and packaging. It is therefore very similar to what rye can do. Although rye will still be in active development, you may want to give uv a try since you probably have it already installed.

This tool aims to facilitate the transition from rye to uv. It converts the tool.rye setttings in pyproject.toml to tool.uv and make adjustments when needed.

Usage

Usage: rye-uv [OPTIONS] <PYPROJECT>

Arguments:
  <PYPROJECT>  The path of the pyproject.toml file

Options:
      --no-overwrite  Whether to overwrite the existing pyproject.toml - defaults to false
      --no-backup     Don't create a backup file of the original rye config - defaults to false
  -p, --print         Just print the output file
  -h, --help          Print help
  -V, --version       Print version

By doing the default:

rye-uv pyproject.toml
  1. The pyproject.toml file will be overwritten
  2. The original version of the file will be stored in pyproject-rye.toml
rye-uv pyproject.toml --no-overwrite
  1. A new pyproject-uv.toml will be creared

How to install

With Cargo

cargo install rye-uv

From source

Clone the repository and build using cargo

cargo build --release

Conversion

Some boolean values will be "inverted" to match.
Other settings may need to be deleted in orther to make the pyproject.toml fully compatible.
See the table below for more.

rye setting uv setting rye docs uv docs uv version Inverted Deleted
tool.rye tool.uv Link Link >=0.3.0
tool.rye.universal tool.uv.pip.universal Link Link >=0.3.0
tool.rye.generate-hashes tool.uv.pip.generate-hashes Link Link >=0.3.0
tool.rye.lock-with-sources tool.uv.no-source Link Link >=0.3.0
tool.rye.virtual Link >=0.3.0,<0.4.0
tool.rye.virtual too.uv.package Link Link >=0.4.0

Dependencies

~5–16MB
~156K SLoC