Skip to content

Commit

Permalink
Merge #233
Browse files Browse the repository at this point in the history
233: Switch to using `build` (instead of `pep517`) r=duckinator a=nbraud



Co-authored-by: nicoo <[email protected]>
  • Loading branch information
bors[bot] and nbraud authored Jan 3, 2021
2 parents f329f68 + b471896 commit 6d2c896
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Lint_task:
container:
image: python:3.8-slim
install_script:
- pip install -U --upgrade-strategy eager pip 'setuptools>42'
- pip install .
- pip install .[testing]
script:
Expand All @@ -24,6 +25,7 @@ Zipapp_bootstrap_task:
image: python:3.8-slim
image: python:3.9-slim
setup_script:
- pip install -U --upgrade-strategy eager pip 'setuptools>42'
- cp -r . /tmp/bork-pristine
- cp -r /tmp/bork-pristine /tmp/pass1
- cp -r /tmp/bork-pristine /tmp/pass2
Expand Down Expand Up @@ -58,6 +60,7 @@ Linux_task:
install_script:
- apt-get update
- apt-get install -y git
- pip install -U --upgrade-strategy eager pip 'setuptools>42'
- pip install . .[testing]
script:
- python3 --version
Expand All @@ -82,6 +85,7 @@ macOS_task:
- pyenv install ${PYTHON}
- pyenv global ${PYTHON}
- pyenv rehash
- pip install -U --upgrade-strategy eager pip 'setuptools>42'
- pip install -e .[testing]
script:
- python3 --version
Expand All @@ -99,6 +103,7 @@ FreeBSD_task:
- PY=`echo $PYTHON | tr -d '.'`
- pkg install -y python${PY} py${PY}-setuptools git
- python${PYTHON} -m ensurepip
- python${PYTHON} -m pip install -U --upgrade-strategy eager pip 'setuptools>42'
- python${PYTHON} -m pip install -e .[testing_only]
script:
- python${PYTHON} --version
Expand Down Expand Up @@ -138,6 +143,7 @@ Release_task:
install_script:
- apt-get update
- apt-get install -y git
- pip install -U --upgrade-strategy eager pip 'setuptools>42'
- pip3 install . .[testing]
build_script:
- bork clean
Expand Down
9 changes: 4 additions & 5 deletions bork/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Slight kludge so we can have a function named zipapp().
import zipapp as Zipapp # noqa: N812

import pep517.build # type: ignore
import build
import toml

from .filesystem import load_setup_cfg, try_delete
Expand All @@ -19,10 +19,9 @@
def dist():
"""Build the sdist and wheel distributions."""

# We can use the pep517 library to add separate source and binary build
# functions, but I'm leaving that alone unless someone asks for it.
args = ['--source', '--binary']
pep517.build.main(pep517.build.parser.parse_args(['.', *args]))
builder = build.ProjectBuilder('.')
builder.build('sdist', './dist/')
builder.build('wheel', './dist/')


def _package_name():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
# Specify the required build system.
requires = ["setuptools", "wheel"]
requires = ["setuptools > 42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.bork]
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ python_requires = >=3.6
# The importlib_metadata library is required by Twine for Python 3.7 and
# earlier, but we pull it in unconditionally so the zipapp is version-agnostic.
install_requires =
wheel==0.36.2
build==0.1.0
packaging==20.8
toml==0.10.2
pep517==0.9.1
twine==3.3.0
click==7.1.2
coloredlogs==15.0
Expand Down

0 comments on commit 6d2c896

Please sign in to comment.