@@ -65,71 +65,66 @@ Development Tools
6565
6666In order to develop beets, you will need a few tools installed:
6767
68- - poetry _ for packaging, virtual environment and dependency management
68+ - uv _ for packaging, virtual environment and dependency management
6969- poethepoet _ to run tasks, such as linting, formatting, testing
7070
71- Python community recommends using pipx _ to install stand-alone command-line
72- applications such as above. pipx _ installs each application in an isolated
73- virtual environment, where its dependencies will not interfere with your system
74- and other CLI tools.
71+ Follow the `uv installation instructions
72+ <https://docs.astral.sh/uv/getting-started/installation/> `__ to install uv _.
7573
76- If you do not have pipx _ installed in your system, follow `pipx installation
77- instructions <https://pipx.pypa.io/stable/how-to/install-pipx/> `__ or
74+ poethepoet _ is a stand-alone CLI tool. The Python community recommends using
75+ pipx _ to install such tools in isolated environments so their dependencies don't
76+ interfere with your system. If you don't have pipx _ installed, follow the `pipx
77+ installation instructions <https://pipx.pypa.io/stable/how-to/install-pipx/> `__
78+ or run:
7879
7980.. code-block :: sh
8081
8182 $ python3 -m pip install --user pipx
8283
83- Install poetry _ and poethepoet _ using pipx _ :
84+ Then install poethepoet _:
8485
8586::
8687
87- $ pipx install poetry poethepoet
88+ $ pipx install poethepoet
8889
8990.. admonition :: Check ``tool.pipx-install`` section in ``pyproject.toml`` to see supported versions
9091
9192 .. code-block :: toml
9293
9394 [tool.pipx-install]
9495 poethepoet = ">=0.26"
95- poetry = "<2"
9696
9797 .. _getting-the-source :
9898
9999Getting the Source
100100++++++++++++++++++
101101
102102The easiest way to get started with the latest beets source is to clone the
103- repository and install ``beets `` in a local virtual environment using poetry _ .
103+ repository and install ``beets `` in a local virtual environment using uv _ .
104104This can be done with:
105105
106106.. code-block :: bash
107107
108108 $ git clone https://github.com/beetbox/beets.git
109109 $ cd beets
110- $ poetry install
110+ $ uv sync
111111
112- This will install ``beets `` and all development dependencies into its own
113- virtual environment in your ``$POETRY_CACHE_DIR ``. See ``poetry install --help ``
114- for installation options, including installing ``extra `` dependencies for
115- plugins.
112+ This will install ``beets `` and all development dependencies into a ``.venv ``
113+ virtual environment. See ``uv sync --help `` for options, including installing
114+ ``extra `` dependencies for plugins (e.g. ``uv sync --extra fetchart ``).
116115
117- In order to run something within this virtual environment, start the command
118- with ``poetry run `` to them, for example ``poetry run pytest ``.
119-
120- On the other hand, it may get tedious to type ``poetry run `` before every
121- command. Instead, you can activate the virtual environment in your shell with:
116+ To run commands within this virtual environment, either activate it:
122117
123118::
124119
125- $ poetry shell
120+ $ source .venv/bin/activate
121+ $ pytest
126122
127- You should see ``(beets-py3.10) `` prefix in your shell prompt. Now you can run
128- commands directly, for example:
123+ Or prefix commands with ``uv run ``:
129124
130125::
131126
132- $ (beets-py3.10) pytest
127+ $ uv run pytest
133128
134129Additionally, poethepoet _ task runner assists us with the most common
135130operations. Formatting, linting, testing are defined as ``poe `` tasks in
@@ -351,7 +346,7 @@ Test Dependencies
351346The tests have a few more dependencies than beets itself. (The additional
352347dependencies consist of testing utilities and dependencies of non-default
353348plugins exercised by the test suite.) The dependencies are listed under the
354- ``tool.poetry.group. test.dependencies `` section in pyproject.toml _.
349+ ``test `` group in the `` dependency-groups `` section of pyproject.toml _.
355350
356351Writing Tests
357352~~~~~~~~~~~~~
@@ -412,7 +407,7 @@ beets also defines custom pytest markers in ``test/conftest.py``:
412407
413408.. _poethepoet : https://poethepoet.natn.io/index.html
414409
415- .. _ poetry : https://python-poetry.org/docs /
410+ .. _ uv : https://docs.astral.sh/uv /
416411
417412.. _pyproject.toml : https://github.com/beetbox/beets/blob/master/pyproject.toml
418413
0 commit comments