Skip to content
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ current_version = 0.13.0
commit = True
tag = True

[bumpversion:file:pep517/__init__.py]
[bumpversion:file:src/pyproject_hooks/__init__.py]
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down
46 changes: 3 additions & 43 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Usage—you are responsible for ensuring build requirements are available:

import os
import tomli
from pep517.wrappers import Pep517HookCaller
from pyproject_hooks import BuildBackendHookCaller

src = 'path/to/source' # Folder containing 'pyproject.toml'
with open(os.path.join(src, 'pyproject.toml'), 'rb') as f:
Expand All @@ -33,8 +33,8 @@ Usage—you are responsible for ensuring build requirements are available:
# The caller is responsible for installing these and running the hooks in
# an environment where they are available.

hooks = Pep517HookCaller(
src,
hooks = BuildBackendHookCaller(
src,
build_backend=build_sys['build-backend'],
backend_path=build_sys.get('backend-path'),
)
Expand All @@ -47,43 +47,3 @@ Usage—you are responsible for ensuring build requirements are available:
destination = 'also/a/folder'
whl_filename = hooks.build_wheel(destination, config_options)
assert os.path.isfile(os.path.join(destination, whl_filename))

Deprecated high-level
---------------------

For now, ``pep517`` also contains higher-level functions which install the build
dependencies into a temporary environment and build a wheel/sdist using them.
This is a rough implementation, e.g. it does not do proper build isolation.
The `PyPA build project <https://github.com/pypa/build>`_ is recommended as an
alternative, although it's still quite young in October 2020.
This layer of functionality in ``pep517`` is now deprecated, but won't be
removed for some time, as there is code relying on it.

High level usage, with build requirements handled:

.. code-block:: python

import os
from pep517.envbuild import build_wheel, build_sdist

src = 'path/to/source' # Folder containing 'pyproject.toml'
destination = 'also/a/folder'
whl_filename = build_wheel(src, destination)
assert os.path.isfile(os.path.join(destination, whl_filename))

targz_filename = build_sdist(src, destination)
assert os.path.isfile(os.path.join(destination, targz_filename))

To test the build backend for a project, run in a system shell:

.. code-block:: shell

python3 -m pep517.check path/to/source # source dir containing pyproject.toml

To build a backend into source and/or binary distributions, run in a shell:

.. code-block:: shell

python -m pep517.build path/to/source # source dir containing pyproject.toml

All of this high-level functionality is deprecated.
8 changes: 4 additions & 4 deletions doc/callhooks.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
API reference
=============

.. module:: pep517
.. module:: pyproject_hooks

Calling the build system
------------------------

.. autoclass:: Pep517HookCaller
.. autoclass:: BuildBackendHookCaller

.. automethod:: get_requires_for_build_sdist

Expand All @@ -29,8 +29,8 @@ Calling the build system
Subprocess runners
------------------

These functions may be provided when creating :class:`Pep517HookCaller`,
or to :meth:`Pep517HookCaller.subprocess_runner`.
These functions may be provided when creating :class:`BuildBackendHookCaller`,
or to :meth:`BuildBackendHookCaller.subprocess_runner`.

.. autofunction:: default_subprocess_runner

Expand Down
2 changes: 1 addition & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Changelog
- Deprecated the higher level API which handles creating an environment and
installing build dependencies. This was not very complete, and the `PyPA build
project <https://github.com/pypa/build>`_ is designed for this use case.
- New ``python_executable`` parameter for :class:`.Pep517HookCaller` to run hooks
- New ``python_executable`` parameter for :class:`.BuildBackendHookCaller` to run hooks
with a different Python interpreter.
- Fix for locating the script to run in the subprocess in some scenarios.
- Fix example in README to get ``build-backend`` correctly.
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# -- Project information -----------------------------------------------------

project = 'pep517'
project = 'pyproject-hooks'
copyright = '2020, Thomas Kluyver'
author = 'Thomas Kluyver'

Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pep517
======
pyproject-hooks
===============

This package provides an API to call the hooks defined in :pep:`517`.

Expand Down
4 changes: 0 additions & 4 deletions issue_template.md

This file was deleted.

6 changes: 0 additions & 6 deletions pep517/__init__.py

This file was deleted.

126 changes: 0 additions & 126 deletions pep517/build.py

This file was deleted.

Loading