Skip to content

Commit

Permalink
Switch from pep517 lib to build CLI
Browse files Browse the repository at this point in the history
This is necessary because `pep517` is going to drop its experimental
CLIs eventually and the PyPA recomments using a new tool called
`build` instead. `pypa/build` is a CLI built around the APIs provided
by the `pep517` library.

Refs:
* pypa/pyproject-hooks#83
* pypa/pyproject-hooks#91
  • Loading branch information
webknjaz committed Apr 13, 2021
1 parent 12086a8 commit 7c7e967
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-n-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
env:
ANSIBLE_PYLIBSSH_TRACING: >-
${{ fromJSON(needs.pre-setup.outputs.profiling_enabled) && 1 || 0 }}
PEP517_ARGS: --binary
PEP517_BUILD_ARGS: --binary
PY_COLORS: 1
TOXENV: build-wheels-pip,delocate-macos-wheels,metadata-validation
TOX_PARALLEL_NO_SPINNER: 1
Expand Down Expand Up @@ -580,7 +580,7 @@ jobs:
env:
ANSIBLE_PYLIBSSH_TRACING: >-
${{ fromJSON(needs.pre-setup.outputs.profiling_enabled) && 1 || 0 }}
PEP517_ARGS: --source
PEP517_BUILD_ARGS: --source
PY_COLORS: 1
TOXENV: build-dists,metadata-validation
TOX_PARALLEL_NO_SPINNER: 1
Expand Down
18 changes: 8 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist = python
minversion = 3.19.0
minversion = 3.21.0
requires =
setuptools >= 40.9.0
pip >= 19.0.3
Expand Down Expand Up @@ -91,7 +91,7 @@ setenv =
[dists]
setenv =
{[testenv]setenv}
PEP517_OUT_DIR = {env:PEP517_OUT_DIR:{toxinidir}/dist}
PEP517_OUT_DIR = {env:PEP517_OUT_DIR:{toxinidir}{/}dist}


[testenv:cleanup-dists]
Expand All @@ -118,18 +118,16 @@ isolated_build = true
usedevelop = false
skip_install = true
deps =
# NOTE: v0.7.0 added support for backend-path in pyproject.toml but
# NOTE: why not use something newer if we can?
pep517 >= 0.8.2
build >= 0.3.1, < 0.4.0
passenv =
PEP517_ARGS
PEP517_BUILD_ARGS
setenv =
{[dists]setenv}
commands =
{envpython} -m pep517.build \
{env:PEP517_ARGS:--source --binary} \
--out-dir {env:PEP517_OUT_DIR} \
{toxinidir}
{envpython} -m build \
--outdir '{env:PEP517_OUT_DIR}{/}' \
{posargs:{env:PEP517_BUILD_ARGS:--sdist --wheel}} \
'{toxinidir}'


[testenv:build-wheels-pip]
Expand Down

0 comments on commit 7c7e967

Please sign in to comment.