From 272f85ebb070c2bd15ad05d56704491e1f73cba7 Mon Sep 17 00:00:00 2001 From: "A. Karl Kornel" Date: Wed, 4 May 2022 16:28:13 -0700 Subject: [PATCH] Add an empty setup.cfg, for editable installs 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 https://github.com/pypa/setuptools/issues/2816 is completed, the file can probably be removed. --- setup.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..f9d4687 --- /dev/null +++ b/setup.cfg @@ -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.