Repository: pypa/build
Pull request #237 (2021-02-13 12:18:57)

misc: add @layday to the code owners
We should have done this when we invited @layday to be a maintainer 👏🏻


Patch:
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 662819c..ac4cc57 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,1 +1,1 @@
-*       @FFY00 @gaborbernat
+*       @FFY00 @gaborbernat @layday
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c6a2b67..7ec4a05 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -7,9 +7,12 @@ Unreleased
 ==========
 
 - Upgrade pip based on venv pip version, avoids error from unrecognised pip flag on Debian Python 3.6.5-3.8 (`PR #229`_, Fixes `#228`_)
+- Build dependencies in isolation, instead of in the build environment (`PR #232`_, Fixes `#231`_)
 
 .. _PR #229: https://github.com/pypa/build/pull/229
 .. _#228: https://github.com/pypa/build/issues/228
+.. _PR #232: https://github.com/pypa/build/pull/232
+.. _#231: https://github.com/pypa/build/issues/231
 
 
 
diff --git a/docs/conf.py b/docs/conf.py
index 0461bd3..26e77d0 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -34,7 +34,7 @@ extensions = [
     'sphinx.ext.autodoc',
     'sphinx.ext.intersphinx',
     'sphinx_autodoc_typehints',
-    'sphinxcontrib.autoprogram',
+    'sphinx_argparse_cli',
 ]
 
 intersphinx_mapping = {
diff --git a/docs/index.rst b/docs/index.rst
index c29535e..d3c25a1 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -9,8 +9,12 @@ A simple, correct :pep:`517` package builder.
 build will invoke the :pep:`517` hooks to build a distribution package.
 It is a simple build tool and does not perform any dependency management.
 
-.. autoprogram:: build.__main__:main_parser()
-   :prog: python -m build
+.. sphinx_argparse_cli::
+  :module: build.__main__
+  :func: main_parser
+  :prog: python -m build
+  :title: python -m build
+  :usage_width: 97
 
 .. note::
 
@@ -18,7 +22,7 @@ It is a simple build tool and does not perform any dependency management.
    can use it.
 
 By default build will build the package in an isolated
-environment, but this behavior can be disabled with `--no-isolation`.
+environment, but this behavior can be disabled with ``--no-isolation``.
 
 .. toctree::
    :hidden:
diff --git a/setup.cfg b/setup.cfg
index 4966157..f7da881 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -45,8 +45,8 @@ console_scripts =
 docs =
     furo>=2020.11.19b18
     sphinx~=3.0
+    sphinx-argparse-cli>=1.5
     sphinx-autodoc-typehints>=1.10
-    sphinxcontrib-autoprogram>=0.1
 test =
     filelock>=3
     pytest>=4
diff --git a/src/build/__main__.py b/src/build/__main__.py
index 32681c1..864e615 100644
--- a/src/build/__main__.py
+++ b/src/build/__main__.py
@@ -160,7 +160,7 @@ def main_parser():  # type: () -> argparse.ArgumentParser
         '-C',
         action='append',
         help='pass options to the backend.  options which begin with a hyphen must be in the form of '
-        '`--config-setting=--opt(=value)` or `-C--opt(=value)`',
+        '"--config-setting=--opt(=value)" or "-C--opt(=value)"',
     )
     return parser
 
diff --git a/src/build/env.py b/src/build/env.py
index 8d79527..d2f031a 100644
--- a/src/build/env.py
+++ b/src/build/env.py
@@ -143,6 +143,7 @@ class _IsolatedEnvVenvPip(IsolatedEnv):
                 '-{}m'.format('E' if sys.version_info[0] == 2 else 'I'),
                 'pip',
                 'install',
+                '--use-pep517',
                 '--no-warn-script-location',
                 '-r',
                 os.path.abspath(req_file.name),
diff --git a/tox.ini b/tox.ini
index 9f727c8..ed813f6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -52,7 +52,7 @@ commands =
 description = run type check on code base
 extras = typing
 commands =
-    mypy --python-version 3.8 src/build
+    mypy --python-version 3.5 src/build
     mypy --python-version 2.7 src/build
 
 [testenv:docs]
@@ -61,7 +61,7 @@ basepython = python3.8
 extras =
     docs
 commands =
-    sphinx-build -n -W docs {envtmpdir}
+    sphinx-build -n docs {envtmpdir} {posargs:-W}
     python -c 'print("Documentation available under file://{envtmpdir}/index.html")'
 
 [testenv:dev]


Test patch:
diff --git a/tests/test_env.py b/tests/test_env.py
index 04f18ab..b9f6742 100644
--- a/tests/test_env.py
+++ b/tests/test_env.py
@@ -42,6 +42,7 @@ def test_isolated_environment_install(mocker):
             '-{}m'.format('E' if sys.version_info[0] == 2 else 'I'),
             'pip',
             'install',
+            '--use-pep517',
             '--no-warn-script-location',
             '-r',
         ]