migrate-to-uv is a command-line tool designed to help users transition their Python projects from traditional package managers like Poetry, Pipenv, or pip to `uv`'s `pyproject.toml` format. It aims to automate the conversion of project metadata, dependencies, and build configurations to be compatible with `uv`. The current version is 0.12.0, with new releases occurring regularly, often weekly or bi-weekly, to introduce features and address bugs.
pip install migrate-to-uvNo compatibility data collected yet for this library.
This quickstart demonstrates migrating a simple Poetry project to be compatible with `uv`'s `pyproject.toml` standards. It sets up a basic Poetry project, adds some dependencies, and then uses `migrate-to-uv` to convert its configuration. After migration, you would typically use `uv sync` to install dependencies.
No direct fix needed, as this is an automated improvement. If you require a specific build backend (e.g., Hatch for complex cases), you can still explicitly set it with `--build-backend hatch`.
If your project relies on specific dependency group behavior, explicitly set `--dependency-groups-strategy legacy` to revert to the pre-0.11.0 behavior, or use `--dependency-groups-strategy all` or `--dependency-groups-strategy explicit` as needed.
Carefully review the error messages provided by `migrate-to-uv`. These messages will highlight specific features or configurations in your project that are not directly convertible or have no equivalent in `uv`, requiring manual adjustment before retry.
If migration to `uv` build backend fails, try migrating without specifying the build backend (allowing `migrate-to-uv` to choose automatically, often defaulting to Hatch for complex cases), or explicitly choose `--build-backend hatch`.
Ensure that your package directory (e.g., `src/my_package_name`) contains an `__init__.py` file. If your project is using implicit namespace packages, consider restructuring to explicit packages or using the Hatch backend which supports more flexible layouts.
Examine the `pyproject.toml` or `poetry.lock` for the specified dependency. You may need to simplify the version constraint or manually adjust it after a partial migration to a format like `some-package = ">=1.0, <2.0"` which is generally well-supported.
Install the package using pip: `pip install migrate-to-uv`. Ensure your Python scripts directory (e.g., `~/.local/bin` on Linux/macOS or `Scripts` folder in your Python installation on Windows) is included in your system's PATH environment variable.
No dependency data recorded yet.