Fix typing
This commit is contained in:
@@ -9,7 +9,7 @@ import textwrap
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Callable, Sequence
|
from typing import Any, Callable, Sequence
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
from filelock import FileLock
|
from filelock import FileLock
|
||||||
@@ -34,6 +34,7 @@ from .util import (
|
|||||||
prepare_command,
|
prepare_command,
|
||||||
read_python_configs,
|
read_python_configs,
|
||||||
shell,
|
shell,
|
||||||
|
unwrap,
|
||||||
virtualenv,
|
virtualenv,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -132,7 +133,7 @@ def setup_setuptools_cross_compile(
|
|||||||
python_configuration: PythonConfiguration,
|
python_configuration: PythonConfiguration,
|
||||||
python_libs_base: Path,
|
python_libs_base: Path,
|
||||||
env: dict[str, str],
|
env: dict[str, str],
|
||||||
cleanup_command_list: list[Callable[[], None]],
|
cleanup_command_list: list[Callable[[], Any]],
|
||||||
) -> None:
|
) -> None:
|
||||||
# We write to distutils_cfg for distutils-based builds to override some
|
# We write to distutils_cfg for distutils-based builds to override some
|
||||||
# settings. Ideally, we'd pass them on the command line, but since we don't
|
# settings. Ideally, we'd pass them on the command line, but since we don't
|
||||||
@@ -220,7 +221,7 @@ def setup_rust_cross_compile(
|
|||||||
python_configuration: PythonConfiguration,
|
python_configuration: PythonConfiguration,
|
||||||
python_libs_base: Path,
|
python_libs_base: Path,
|
||||||
env: dict[str, str],
|
env: dict[str, str],
|
||||||
cleanup_command_list: list[Callable[[], None]],
|
cleanup_command_list: list[Callable[[], Any]],
|
||||||
) -> None:
|
) -> None:
|
||||||
# Assume that MSVC will be used, because we already know that we are
|
# Assume that MSVC will be used, because we already know that we are
|
||||||
# cross-compiling. MinGW users can set CARGO_BUILD_TARGET themselves
|
# cross-compiling. MinGW users can set CARGO_BUILD_TARGET themselves
|
||||||
@@ -251,7 +252,7 @@ def setup_python(
|
|||||||
dependency_constraint_flags: Sequence[PathOrStr],
|
dependency_constraint_flags: Sequence[PathOrStr],
|
||||||
environment: ParsedEnvironment,
|
environment: ParsedEnvironment,
|
||||||
build_frontend: BuildFrontend,
|
build_frontend: BuildFrontend,
|
||||||
cleanup_command_list: list[Callable[[], None]],
|
cleanup_command_list: list[Callable[[], Any]],
|
||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
tmp.mkdir()
|
tmp.mkdir()
|
||||||
implementation_id = python_configuration.identifier.split("-")[0]
|
implementation_id = python_configuration.identifier.split("-")[0]
|
||||||
@@ -421,7 +422,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
|
|
||||||
# list of callables to do any urgent cleanup, for example,
|
# list of callables to do any urgent cleanup, for example,
|
||||||
# config files that may bleed into other builds
|
# config files that may bleed into other builds
|
||||||
cleanup_command_list = []
|
cleanup_command_list: list[Callable[[], Any]] = []
|
||||||
# install Python
|
# install Python
|
||||||
env = setup_python(
|
env = setup_python(
|
||||||
identifier_tmp_dir / "build",
|
identifier_tmp_dir / "build",
|
||||||
|
|||||||
Reference in New Issue
Block a user