PHP 8.2.30
Preview: wheel.py Size: 1.11 KB
/proc/thread-self/root/opt/hc_python/lib64/python3.12/site-packages/pip/_internal/operations/build/wheel.py

from __future__ import annotations

import logging
import os

from pip._vendor.pyproject_hooks import BuildBackendHookCaller

from pip._internal.utils.subprocess import runner_with_spinner_message

logger = logging.getLogger(__name__)


def build_wheel_pep517(
    name: str,
    backend: BuildBackendHookCaller,
    metadata_directory: str,
    wheel_directory: str,
) -> str | None:
    """Build one InstallRequirement using the PEP 517 build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    """
    assert metadata_directory is not None
    try:
        logger.debug("Destination directory: %s", wheel_directory)

        runner = runner_with_spinner_message(
            f"Building wheel for {name} (pyproject.toml)"
        )
        with backend.subprocess_runner(runner):
            wheel_name = backend.build_wheel(
                wheel_directory=wheel_directory,
                metadata_directory=metadata_directory,
            )
    except Exception:
        logger.error("Failed building wheel for %s", name)
        return None
    return os.path.join(wheel_directory, wheel_name)

Directory Contents

Dirs: 1 × Files: 6

Name Size Perms Modified Actions
- drwxr-xr-x 2025-12-03 08:02:41
Edit Download
4.66 KB lrw-r--r-- 2025-12-03 08:02:41
Edit Download
1.39 KB lrw-r--r-- 2025-12-03 08:02:41
Edit Download
1.47 KB lrw-r--r-- 2025-12-03 08:02:41
Edit Download
1.11 KB lrw-r--r-- 2025-12-03 08:02:41
Edit Download
1.44 KB lrw-r--r-- 2025-12-03 08:02:41
Edit Download
0 B lrw-r--r-- 2025-12-03 08:02:41
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).