Skip to content

Experiemental build env backend by pypa/build #11602

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
11 changes: 11 additions & 0 deletions news/11602.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Add support to use `build <https://pypi.org/project/build/>`_ as an alternative
isolated build environment implementation. The implementation can be enabled by
installing ``build`` into the environment, and adding the ``--use-feature=build``
flag to various pip commands.

``build`` is a light-weight build frontend for ``pyproject.toml`` projects,
providing various benefits by leveraging modern standards and tools. This
addition only enables pip to use its logic for environment creation and
populating build dependencies. Depending on feedback, pip may switch to also
run the build logic with ``build``, and switch the default build interface in
the future.
310 changes: 0 additions & 310 deletions src/pip/_internal/build_env.py

This file was deleted.

22 changes: 22 additions & 0 deletions src/pip/_internal/build_env/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""Build Environment used for isolation during sdist building.

Three implementations are available:

* NoOpBuildEnvironment: Does not actually do anything, used by legacy code.
* CustomBuildEnvironment: Old build environment implemented by pip developers.
* PyPABuildEnvironment: New build environment that uses pypa/build.
"""

from .base import NoOpBuildEnvironment, get_runnable_pip
from .custom import BuildEnvironment as CustomBuildEnvironment
from .pypa import BuildEnvironment as PyPABuildEnvironment

BuildEnvironment = NoOpBuildEnvironment

__all__ = [
"BuildEnvironment",
"CustomBuildEnvironment",
"NoOpBuildEnvironment",
"PyPABuildEnvironment",
"get_runnable_pip",
]
Loading