aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-05-15 06:16:11 -0400
committerGitHub <noreply@github.com>2020-05-15 06:16:11 -0400
commit9887350aa500b86feea0859eebe057d56a060d67 (patch)
tree2013eec1df4def402792a3b932d904b714b7e493
parente04c75ab906caadff4609ef34de8973c8e92eff8 (diff)
parent619e229c9777f0ee0851d8c5c94caaad7d89d434 (diff)
downloadexternal_python_setuptools-9887350aa500b86feea0859eebe057d56a060d67.tar.gz
external_python_setuptools-9887350aa500b86feea0859eebe057d56a060d67.tar.bz2
external_python_setuptools-9887350aa500b86feea0859eebe057d56a060d67.zip
Merge pull request #1738 from webknjaz/docs/setup.cfg-only
📝 Document setup.cfg-only possibilities
-rw-r--r--docs/requirements.txt3
-rw-r--r--docs/setuptools.txt43
-rw-r--r--setup.cfg1
3 files changed, 47 insertions, 0 deletions
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 6c35bf64..104d68fa 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -2,3 +2,6 @@
sphinx
jaraco.packaging>=6.1
rst.linker>=1.9
+pygments-github-lexers==0.0.5
+
+setuptools>=34
diff --git a/docs/setuptools.txt b/docs/setuptools.txt
index 30a30c26..ec58b754 100644
--- a/docs/setuptools.txt
+++ b/docs/setuptools.txt
@@ -2198,6 +2198,49 @@ Metadata and options are set in the config sections of the same name.
* Unknown keys are ignored.
+setup.cfg-only projects
+=======================
+
+.. versionadded:: 40.9.0
+
+If ``setup.py`` is missing from the project directory when a :pep:`517`
+build is invoked, ``setuptools`` emulates a dummy ``setup.py`` file containing
+only a ``setuptools.setup()`` call.
+
+.. note::
+
+ :pep:`517` doesn't support editable installs so this is currently
+ incompatible with ``pip install -e .``, as :pep:`517` does not support editable installs.
+
+This means that you can have a Python project with all build configuration
+specified in ``setup.cfg``, without a ``setup.py`` file, if you **can rely
+on** your project always being built by a :pep:`517`/:pep:`518` compatible
+frontend.
+
+To use this feature:
+
+* Specify build requirements and :pep:`517` build backend in
+ ``pyproject.toml``.
+ For example:
+
+ .. code-block:: toml
+
+ [build-system]
+ requires = [
+ "setuptools >= 40.9.0",
+ "wheel",
+ ]
+ build-backend = "setuptools.build_meta"
+
+* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``pep517``.
+
+ .. warning::
+
+ As :pep:`517` is new, support is not universal, and frontends that
+ do support it may still have bugs. For compatibility, you may want to
+ put a ``setup.py`` file containing only a ``setuptools.setup()``
+ invocation.
+
Using a ``src/`` layout
=======================
diff --git a/setup.cfg b/setup.cfg
index 467d1fa7..3933714b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -78,3 +78,4 @@ docs =
sphinx
jaraco.packaging>=6.1
rst.linker>=1.9
+ pygments-github-lexers==0.0.5