check_pyicu.py
Check to see if the requirements of the emoji process are installed.
Examples
>>> python3 src/scribe_data/check/check_pyicu.py
- scribe_data.check.check_pyicu.check_if_pyicu_installed() bool[source]
Check to see if PyICU is installed or not.
- Returns:
- bool
Whether PyICU is installed.
- scribe_data.check.check_pyicu.get_python_version_and_architecture() tuple[str, str][source]
Get the current Python version and architecture.
- Returns:
- python_versionstr
The Python version in the format ‘cpXY’.
- architecturestr
The architecture type (‘amd64’ or ‘win32’).
- scribe_data.check.check_pyicu.fetch_wheel_releases() tuple[list[tuple[str, str]], float][source]
Fetch the release data for PyICU from GitHub with error handling for rate limits.
- Returns:
- available_wheelslist
A list of tuples containing wheel file names and their download URLs.
- total_size_mbfloat
The total size of all available wheels in MB.
- scribe_data.check.check_pyicu.download_wheel_file(wheel_url: str, output_dir: Path) str[source]
Download the wheel file from the given URL.
- Parameters:
- wheel_urlstr
The URL of the wheel file to download.
- output_dirPath
The directory to save the downloaded file.
- Returns:
- str
Path to the downloaded wheel file.
- scribe_data.check.check_pyicu.find_matching_wheel(wheels: list[tuple[str, str]], python_version: str, architecture: str) str | None[source]
Find the matching wheel file based on Python version and architecture.
- Parameters:
- wheelslist
The list of available wheels.
- python_versionstr
The Python version (e.g., ‘cp311’).
- architecturestr
The architecture type (e.g., ‘win_amd64’).
- Returns:
- str
The download URL of the matching wheel or None if not found.