Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using build (instead of pep517) #233

Merged
merged 6 commits into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -23,6 +24,7 @@ Zipapp_bootstrap_task:
image: python:3.7-slim
image: python:3.8-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 @@ -56,6 +58,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 @@ -78,6 +81,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 @@ -94,6 +98,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 @@ -133,6 +138,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 @@ -27,9 +27,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