From e541907f27b5b56eb82d12d81bc5ea076c1d8116 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 14 Sep 2020 16:13:59 -0400 Subject: [PATCH] fix: change to newly recommended tool instead of pep517.build This was intended as a proof of concept; build seems to be the correct replacement. See https://github.com/pypa/pep517/pull/83 --- .github/CONTRIBUTING.md | 8 ++++---- .github/workflows/configure.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ca221fbd44..58aa5b4df1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -224,14 +224,14 @@ source, it is best to have Pip 10 on a manylinux1, macOS, or Windows system. You can then build the SDists, or run any procedure that makes SDists internally, like making wheels or installing. Since Pip itself does not have an `sdist` command (it does have `wheel` and `install`), you will -need to use the `pep517` package directly: +need to use the upcoming `build` package: ```bash # Normal package -python3 -m pep517.build -s . +python3 -m build -s . # Global extra -PYBIND11_GLOBAL_SDIST=1 python3 -m pep517.build -s . +PYBIND11_GLOBAL_SDIST=1 python3 -m build -s . ``` If you want to use the classic "direct" usage of `python setup.py`, you will @@ -256,7 +256,7 @@ When you invoke any `setup.py` command from the source directory, including `pip wheel .` and `pip install .`, you will activate a full source build. This is made of the following steps: -1. If the tool is PEP 518 compliant, like `pep517.build` or Pip 10+, it will +1. If the tool is PEP 518 compliant, like `build` or Pip 10+, it will create a temporary virtual environment and install the build requirements (mostly CMake) into it. (if you are not on Windows, macOS, or a manylinux compliant system, you can disable this with `--no-build-isolation` as long diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index 2a9c81a7cf..3dd248e04a 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -120,15 +120,15 @@ jobs: python-version: 3.8 - name: Prepare env - run: python -m pip install -r tests/requirements.txt pep517 twine --prefer-binary + run: python -m pip install -r tests/requirements.txt build twine --prefer-binary - name: Python Packaging tests run: pytest tests/extra_python_package/ - name: Build SDist and wheels run: | - python -m pep517.build -s -b . - PYBIND11_GLOBAL_SDIST=1 python -m pep517.build -s -b . + python -m build -s -w . + PYBIND11_GLOBAL_SDIST=1 python -m build -s -w . - name: Check metadata run: twine check dist/*