Files
cibuildwheel/cibuildwheel/typing.py
T

32 lines
674 B
Python
Raw Normal View History

2023-04-18 23:05:34 -04:00
from __future__ import annotations
import os
import subprocess
import typing
from typing import Final, Literal, Protocol, Union
2023-04-18 23:05:34 -04:00
__all__ = (
"PLATFORMS",
"PathOrStr",
"PlatformName",
"PLATFORMS",
"PopenBytes",
)
if typing.TYPE_CHECKING:
PopenBytes = subprocess.Popen[bytes]
PathOrStr = Union[str, os.PathLike[str]]
else:
PopenBytes = subprocess.Popen
PathOrStr = Union[str, "os.PathLike[str]"]
2024-05-28 05:31:36 -07:00
PlatformName = Literal["linux", "macos", "windows", "pyodide"]
PLATFORMS: Final[set[PlatformName]] = {"linux", "macos", "windows", "pyodide"}
2023-04-18 23:05:34 -04:00
class GenericPythonConfiguration(Protocol):
@property
def identifier(self) -> str: ...