Skip to content

Commit 18c634a

Browse files
authored
Merge pull request #856 from henryiii/fix/838
fix: try harder to avoid a common user mistake
2 parents 1f66f1a + 7173541 commit 18c634a

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

source/tutorials/packaging-projects.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ project's root directory - you will add content to them in the following steps.
5151
│   └── __init__.py
5252
├── pyproject.toml
5353
├── setup.cfg
54-
├── setup.py
54+
├── setup.py # optional, needed to make editable pip installs work
5555
└── tests
5656
5757
@@ -198,18 +198,23 @@ an escape hatch when absolutely necessary.
198198
If you create a :file:`setup.py` file, this will enable direct interaction
199199
with :file:`setup.py` (which generally should be avoided), and editable
200200
installs. This file used to be required, but can be omitted in modern
201-
setuptools. If you include the file, you must have a call to
202-
:func:`setup()` in it:
201+
setuptools.
203202

204-
.. code-block:: python
203+
.. warning::
205204

206-
import setuptools
205+
If you include the file, you **must have** a call to :func:`setup()` in it,
206+
even if there are no arguments:
207+
208+
.. code-block:: python
209+
210+
import setuptools
207211
208-
setuptools.setup()
212+
setuptools.setup()
209213
210214
Anything you set in :file:`setup.cfg` can instead be set via keyword argument to
211215
:func:`setup()`; this enables computed values to be used. You will also need
212-
:func:`setup()` for setting up extension modules for compilation.
216+
:func:`setup()` for setting up extension modules for compilation. Currently,
217+
having this file also is required if you want to use editable installs with pip.
213218

214219

215220
.. tab:: setup.py (dynamic)

0 commit comments

Comments
 (0)