Skip to content

Commit 7cd56d3

Browse files
committed
Add back notes about editable install and pyproject metadata
On further examination, `pip` seems to fail if `setup.py` is missing.
1 parent 3ea3066 commit 7cd56d3

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

docs/userguide/pyproject_config.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ Configuring setuptools using ``pyproject.toml`` files
1212
``setuptools`` via ``pyproject.toml`` files is still experimental and might
1313
change (or be removed) in future releases.
1414

15+
.. important::
16+
For the time being, ``pip`` still might require a ``setup.py`` file
17+
to support :doc:`editable installs <pip:cli/pip_install>`.
18+
19+
A simple script will suffice, for example:
20+
21+
.. code-block:: python
22+
23+
from setuptools import setup
24+
25+
setup()
26+
1527
Starting with :pep:`621`, the Python community selected ``pyproject.toml`` as
1628
a standard way of specifying *project metadata*.
1729
``Setuptools`` has adopted this standard and will use the information contained

docs/userguide/quickstart.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,23 @@ associate with your source code. For more information, see :doc:`development_mod
343343

344344
Prior to :ref:`pip v21.1 <pip:v21-1>`, a ``setup.py`` script was
345345
required to be compatible with development mode. With late
346-
versions of pip, any project may be installed in this mode.
346+
versions of pip, ``setup.cfg``-only projects may be installed in this mode.
347+
348+
If you are experimenting with :doc:`configuration using <pyproject_config>`,
349+
or have version of ``pip`` older than v21.1, you might need to keep a
350+
``setup.py`` file in file in your repository if you want to use editable
351+
installs (for the time being).
352+
353+
A simple script will suffice, for example:
354+
355+
.. code-block:: python
356+
357+
from setuptools import setup
358+
359+
setup()
360+
361+
You can still keep all the configuration in :doc:`setup.cfg </userguide/declarative_config>`
362+
(or :doc:`pyproject.toml </userguide/pyproject_config>`).
347363

348364

349365
Uploading your package to PyPI

0 commit comments

Comments
 (0)