|
3 | 3 | ## Requirements for contributing |
4 | 4 |
|
5 | 5 | 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). |
7 | 8 |
|
8 | | -1. The Python version manager `pyenv`. |
| 9 | +### Installing uv |
9 | 10 |
|
10 | | -2. The Python dependency manager `poetry`. |
| 11 | +To install uv, see its |
| 12 | +[installation instructions](https://docs.astral.sh/uv/getting-started/installation/). |
11 | 13 |
|
12 | | -### Installing Poetry |
| 14 | +#### Checking your uv installation |
13 | 15 |
|
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: |
42 | 17 |
|
43 | 18 | ```shell |
44 | | -poetry --version |
| 19 | +uv |
45 | 20 | ``` |
46 | 21 |
|
47 | 22 | #### Installing Cookiecutter as a stand-alone tool (optional) |
48 | 23 |
|
49 | 24 | 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. |
51 | 26 | You don’t need to have it installed as a stand-alone tool, but you |
52 | 27 | may still want to do so for your convenience. |
53 | 28 |
|
54 | 29 | To install Cookiecutter as a stand-alone tool, follow Cookiecutter’s [installation |
55 | 30 | instructions](https://cookiecutter.readthedocs.io/en/stable/installation.html). |
56 | 31 |
|
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 | | - |
73 | 32 | ## Development scripts and tasks |
74 | 33 |
|
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` |
76 | 35 |
|
77 | 36 | ## Running the end-to-end test |
78 | 37 |
|
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` |
80 | 39 |
|
81 | 40 | ## FAQ |
82 | 41 |
|
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 | | - |
97 | 42 | Q: Why is Cookiecutter a development dependency even though I |
98 | 43 | already have a stand-alone Cookiecutter install? |
99 | 44 |
|
|
0 commit comments