Skip to content

Commit f7dee33

Browse files
committed
Switch from pep517 lib to build CLI
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
1 parent 0610eb7 commit f7dee33

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

.github/workflows/build-test-n-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
env:
173173
ANSIBLE_PYLIBSSH_TRACING: >-
174174
${{ fromJSON(needs.pre-setup.outputs.profiling_enabled) && 1 || 0 }}
175-
PEP517_ARGS: --binary
175+
PEP517_BUILD_ARGS: --binary
176176
PY_COLORS: 1
177177
TOXENV: build-wheels-pip,delocate-macos-wheels,metadata-validation
178178
TOX_PARALLEL_NO_SPINNER: 1
@@ -580,7 +580,7 @@ jobs:
580580
env:
581581
ANSIBLE_PYLIBSSH_TRACING: >-
582582
${{ fromJSON(needs.pre-setup.outputs.profiling_enabled) && 1 || 0 }}
583-
PEP517_ARGS: --source
583+
PEP517_BUILD_ARGS: --source
584584
PY_COLORS: 1
585585
TOXENV: build-dists,metadata-validation
586586
TOX_PARALLEL_NO_SPINNER: 1

tox.ini

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist = python
3-
minversion = 3.19.0
3+
minversion = 3.21.0
44
requires =
55
setuptools >= 40.9.0
66
pip >= 19.0.3
@@ -91,7 +91,7 @@ setenv =
9191
[dists]
9292
setenv =
9393
{[testenv]setenv}
94-
PEP517_OUT_DIR = {env:PEP517_OUT_DIR:{toxinidir}/dist}
94+
PEP517_OUT_DIR = {env:PEP517_OUT_DIR:{toxinidir}{/}dist{/}}
9595

9696

9797
[testenv:cleanup-dists]
@@ -118,18 +118,16 @@ isolated_build = true
118118
usedevelop = false
119119
skip_install = true
120120
deps =
121-
# NOTE: v0.7.0 added support for backend-path in pyproject.toml but
122-
# NOTE: why not use something newer if we can?
123-
pep517 >= 0.8.2
121+
build >= 0.3.1, < 0.4.0
124122
passenv =
125-
PEP517_ARGS
123+
PEP517_BUILD_ARGS
126124
setenv =
127125
{[dists]setenv}
128126
commands =
129-
{envpython} -m pep517.build \
130-
{env:PEP517_ARGS:--source --binary} \
131-
--out-dir {env:PEP517_OUT_DIR} \
132-
{toxinidir}
127+
{envpython} -m build \
128+
--outdir '{env:PEP517_OUT_DIR}' \
129+
{posargs:{env:PEP517_BUILD_ARGS:--sdist --wheel}} \
130+
'{toxinidir}'
133131

134132

135133
[testenv:build-wheels-pip]

0 commit comments

Comments
 (0)