Skip to content

Commit 78df6bc

Browse files
committed
fix: reduce the chance of a user having an empty setup.py file
Based on recent issues, this rewording hopefully will reduce a seemly common error of adding a completely empty setup.py file.
1 parent 1ae4b30 commit 78df6bc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

source/tutorials/packaging-projects.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,22 +191,23 @@ an escape hatch when absolutely necessary.
191191
There are many more than the ones mentioned here. See
192192
:doc:`/guides/distributing-packages-using-setuptools` for more details.
193193

194-
195194
If you create a :file:`setup.py` file, this will enable direct interaction
196195
with :file:`setup.py` (which generally should be avoided), and editable
197196
installs. This file used to be required, but can be omitted in modern
198-
setuptools.
199-
200-
Anything you set in :file:`setup.cfg` can instead be set via keyword argument to
201-
:func:`setup()`; this enables computed values to be used. You will also need
202-
:func:`setup()` for setting up extension modules for compilation.
197+
setuptools. If you include the file, you must have a call to
198+
:func:`setup()` in it:
203199

204200
.. code-block:: python
205201
206202
import setuptools
207203
208204
setuptools.setup()
209205
206+
Anything you set in :file:`setup.cfg` can instead be set via keyword argument to
207+
:func:`setup()`; this enables computed values to be used. You will also need
208+
:func:`setup()` for setting up extension modules for compilation.
209+
210+
210211
.. tab:: setup.py (dynamic)
211212

212213
:file:`setup.py` is the build script for :ref:`setuptools`. It tells setuptools

0 commit comments

Comments
 (0)