Skip to content

Commit

Permalink
Add an empty setup.cfg, for editable installs
Browse files Browse the repository at this point in the history
Hello from an empty setup.cfg file!

This project is meant to be developed using an "editable installation".  That
is, an installation you get from running something like `pip install -e .`.
With traditional distributions, from the pre-`pyproject.toml` days, this
would be supported through something like `setup.py develop`.
Later, Pip included support for `pip install -e .` in Setuptools-based
installations that only had a `setup.cfg` (no `setup.py`).

PEP 660 (https://peps.python.org/pep-0660/) has standardized editable
installations that use only `pyproject.toml`.  Unfortunately, Setuptools does
not yet implement the hooks needed to support this.

Luckily, the presence of a `setup.cfg` file is enough to trigger Pip to
fall back to the existing Setuptools editable-install mechanism, which is
still able to read project configuration from `pyproject.toml`.  And so, we
have an empty `setup.cfg`.

Once pypa/setuptools#2816 is completed, the file
can probably be removed.
  • Loading branch information
akkornel committed May 4, 2022
1 parent 68e9d65 commit 272f85e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Hello from an empty setup.cfg file!
#
# This project is meant to be developed using an "editable installation". That
# is, an installation you get from running something like `pip install -e .`.
# With traditional distributions, from the pre-`pyproject.toml` days, this
# would be supported through something like `setup.py develop`.
# Later, Pip included support for `pip install -e .` in Setuptools-based
# installations that only had a `setup.cfg` (no `setup.py`).
#
# PEP 660 (https://peps.python.org/pep-0660/) has standardized editable
# installations that use only `pyproject.toml`. Unfortunately, Setuptools does
# not yet implement the hooks needed to support this.
#
# Luckily, the presence of a `setup.cfg` file is enough to trigger Pip to
# fall back to the existing Setuptools editable-install mechanism, which is
# still able to read project configuration from `pyproject.toml`. And so, we
# have this empty file.
#
# Once https://github.com/pypa/setuptools/issues/2816 is completed, this file
# can probably be removed.

0 comments on commit 272f85e

Please sign in to comment.