Skip to content

Commit 72ca2e3

Browse files
committed
Migrate development to uv
1 parent 5f41e9d commit 72ca2e3

5 files changed

Lines changed: 807 additions & 1037 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,97 +3,42 @@
33
## Requirements for contributing
44

55
To contribute to the `cookiecutter-python-package` template,
6-
you’ll need:
6+
you’ll need the project management tool
7+
[uv](https://docs.astral.sh/uv).
78

8-
1. The Python version manager `pyenv`.
9+
### Installing uv
910

10-
2. The Python dependency manager `poetry`.
11+
To install uv, see its
12+
[installation instructions](https://docs.astral.sh/uv/getting-started/installation/).
1113

12-
### Installing Poetry
14+
#### Checking your uv installation
1315

14-
You’ll need `poetry` to manage development dependencies and the venv.
15-
16-
#### Installing Poetry on Windows
17-
18-
To install Poetry on Windows, use one of the
19-
[installation methods](https://python-poetry.org/docs/master/#installing-with-the-official-installer)
20-
described in Poetry’s documentation.
21-
22-
#### Installing Poetry on Linux
23-
24-
If you’re on Linux or WSL2, use your system package manager to
25-
install Poetry.
26-
27-
Alternatively, use one of the
28-
[installation methods](https://python-poetry.org/docs/master/#installing-with-the-official-installer)
29-
described in Poetry’s documentation.
30-
31-
#### Installing Poetry on macOS
32-
33-
To install Poetry on macOS, run:
34-
35-
```shell
36-
brew install poetry
37-
```
38-
39-
#### Checking your Poetry installation
40-
41-
To verify Poetry is working, run:
16+
To verify uv is working, run:
4217

4318
```shell
44-
poetry --version
19+
uv
4520
```
4621

4722
#### Installing Cookiecutter as a stand-alone tool (optional)
4823

4924
Cookiecutter is already included as a development dependency,
50-
so Poetry will take care of installing it for you.
25+
so uv will take care of installing it for you.
5126
You don’t need to have it installed as a stand-alone tool, but you
5227
may still want to do so for your convenience.
5328

5429
To install Cookiecutter as a stand-alone tool, follow Cookiecutter’s [installation
5530
instructions](https://cookiecutter.readthedocs.io/en/stable/installation.html).
5631

57-
## Setting up your virtual environment
58-
59-
To set up your virtual environment, follow these steps:
60-
61-
1. Go to the project root directory.
62-
63-
2. Run `pyenv install -s`.
64-
65-
3. Run `pyenv exec python -m venv .venv`.
66-
67-
4. Run `poetry install`.
68-
69-
You need to do the above steps only once.
70-
71-
To update your dependencies after a `git pull`, run `poetry install`.
72-
7332
## Development scripts and tasks
7433

75-
To see a list of available tasks, run: `poetry run poe tasks`
34+
To see a list of available tasks, run: `uv run poe tasks`
7635

7736
## Running the end-to-end test
7837

79-
To execute the end-to-end test, run: `poetry run poe e2e`
38+
To execute the end-to-end test, run: `uv run poe e2e`
8039

8140
## FAQ
8241

83-
Q: Why is `pyenv` required even though Cookiecutter accepts any
84-
Python version?
85-
86-
A: Especially because Cookiecutter accepts any Python version,
87-
you’ll want your code to work equally well on all of those supported
88-
Pythons. We achieve that by pinning the minimum Python version
89-
that Cookiecutter supports as our development dependency.
90-
91-
Q: Do I have to add `pyenv` shims to my PATH?
92-
93-
A: No, because this guide
94-
[doesn’t use pyenv’s shims](https://github.com/pyenv/pyenv#using-pyenv-without-shims).
95-
It’s still ok to have them in your PATH if you prefer so.
96-
9742
Q: Why is Cookiecutter a development dependency even though I
9843
already have a stand-alone Cookiecutter install?
9944

0 commit comments

Comments
 (0)