Skip to content
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
28 changes: 28 additions & 0 deletions cibuildwheel/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
__lazy_modules__ = [
"argparse",
"cibuildwheel.architecture",
"cibuildwheel.ci",
"cibuildwheel.logger",
"cibuildwheel.options",
"cibuildwheel.platforms",
"cibuildwheel.selector",
"cibuildwheel.typing",
"cibuildwheel.util",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.resources",
"collections",
"collections.abc",
"contextlib",
"functools",
"os",
"pathlib",
"shutil",
"sys",
"tarfile",
"tempfile",
"textwrap",
"traceback",
"typing",
]

import argparse
import contextlib
import dataclasses
Expand Down
11 changes: 11 additions & 0 deletions cibuildwheel/architecture.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
__lazy_modules__ = [
"cibuildwheel.typing",
"collections",
"collections.abc",
"platform",
"re",
"shutil",
"subprocess",
"sys",
]

import platform as platform_module
import re
import shutil
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/bashlex_eval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__lazy_modules__ = ["bashlex", "subprocess"]

import dataclasses
import subprocess
from collections.abc import (
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/ci.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__lazy_modules__ = ["cibuildwheel.util.helpers", "os"]

import os
import re
from enum import Enum
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/environment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__lazy_modules__ = ["bashlex", "bashlex.errors", "collections", "collections.abc"]

import dataclasses
from collections.abc import Mapping, Sequence
from typing import Any, Protocol
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
semantically clear and unique.
"""

__lazy_modules__ = ["textwrap"]

import textwrap


Expand Down
11 changes: 11 additions & 0 deletions cibuildwheel/extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
These are utilities for the `/bin` scripts, not for the `cibuildwheel` program.
"""

__lazy_modules__ = [
"collections",
"collections.abc",
"io",
"json",
"time",
"urllib",
"urllib.error",
"urllib.request",
]

import json
import time
import typing
Expand Down
8 changes: 8 additions & 0 deletions cibuildwheel/frontend.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
__lazy_modules__ = [
"cibuildwheel.logger",
"cibuildwheel.util.helpers",
"collections",
"collections.abc",
"shlex",
]

import dataclasses
import shlex
import typing
Expand Down
18 changes: 18 additions & 0 deletions cibuildwheel/logger.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
__lazy_modules__ = [
"cibuildwheel.ci",
"codecs",
"collections",
"collections.abc",
"contextlib",
"functools",
"hashlib",
"humanize",
"io",
"os",
"pathlib",
"re",
"sys",
"textwrap",
"time",
]

import codecs
import contextlib
import dataclasses
Expand Down
23 changes: 23 additions & 0 deletions cibuildwheel/oci_container.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
__lazy_modules__ = [
"cibuildwheel.ci",
"cibuildwheel.errors",
"cibuildwheel.logger",
"cibuildwheel.typing",
"cibuildwheel.util.cmd",
"cibuildwheel.util.helpers",
"collections",
"collections.abc",
"io",
"json",
"os",
"pathlib",
"platform",
"shlex",
"shutil",
"subprocess",
"sys",
"textwrap",
"types",
"uuid",
]

import dataclasses
import io
import json
Expand Down
25 changes: 25 additions & 0 deletions cibuildwheel/options.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
__lazy_modules__ = [
"cibuildwheel.architecture",
"cibuildwheel.environment",
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.oci_container",
"cibuildwheel.projectfiles",
"cibuildwheel.selector",
"cibuildwheel.typing",
"cibuildwheel.util",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"collections",
"configparser",
"contextlib",
"difflib",
"packaging",
"packaging.specifiers",
"pathlib",
"shlex",
"textwrap",
"tomllib",
"typing",
]

import collections
import configparser
import contextlib
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/platforms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

__lazy_modules__ = ["sys"]

import sys
from typing import TYPE_CHECKING, Final, Protocol

Expand Down
38 changes: 38 additions & 0 deletions cibuildwheel/platforms/android.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
__lazy_modules__ = [
"build",
"build.env",
"cibuildwheel.architecture",
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.options",
"cibuildwheel.selector",
"cibuildwheel.util",
"cibuildwheel.util.cmd",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"cibuildwheel.util.python_build_standalone",
"cibuildwheel.venv",
"collections",
"collections.abc",
"csv",
"elftools",
"elftools.common.exceptions",
"elftools.elf.elffile",
"filelock",
"hashlib",
"os",
"os.path",
"pathlib",
"platform",
"pprint",
"re",
"runpy",
"shlex",
"shutil",
"subprocess",
"sysconfig",
"textwrap",
"typing",
]

import csv
import hashlib
import os
Expand Down
21 changes: 21 additions & 0 deletions cibuildwheel/platforms/ios.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
from __future__ import annotations

__lazy_modules__ = [
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.platforms.macos",
"cibuildwheel.util",
"cibuildwheel.util.cmd",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"cibuildwheel.venv",
"filelock",
"os",
"pathlib",
"platform",
"shlex",
"shutil",
"subprocess",
"sys",
"textwrap",
]

import dataclasses
import os
import platform
Expand Down
18 changes: 18 additions & 0 deletions cibuildwheel/platforms/linux.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
__lazy_modules__ = [
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.options",
"cibuildwheel.selector",
"cibuildwheel.util",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"collections",
"collections.abc",
"contextlib",
"pathlib",
"subprocess",
"sys",
"textwrap",
]

import contextlib
import dataclasses
import subprocess
Expand Down
30 changes: 30 additions & 0 deletions cibuildwheel/platforms/macos.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
__lazy_modules__ = [
"cibuildwheel.architecture",
"cibuildwheel.ci",
"cibuildwheel.environment",
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.options",
"cibuildwheel.selector",
"cibuildwheel.util",
"cibuildwheel.util.cmd",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"cibuildwheel.venv",
"collections",
"collections.abc",
"filelock",
"inspect",
"os",
"packaging",
"packaging.version",
"pathlib",
"platform",
"re",
"shutil",
"subprocess",
"sys",
"typing",
]

import dataclasses
import functools
import inspect
Expand Down
26 changes: 26 additions & 0 deletions cibuildwheel/platforms/pyodide.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
__lazy_modules__ = [
"cibuildwheel.architecture",
"cibuildwheel.environment",
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.options",
"cibuildwheel.selector",
"cibuildwheel.util",
"cibuildwheel.util.cmd",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"cibuildwheel.util.python_build_standalone",
"cibuildwheel.venv",
"collections",
"collections.abc",
"filelock",
"json",
"os",
"pathlib",
"shutil",
"subprocess",
"tempfile",
"tomllib",
]

import dataclasses
import functools
import json
Expand Down
26 changes: 26 additions & 0 deletions cibuildwheel/platforms/windows.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
__lazy_modules__ = [
"cibuildwheel.architecture",
"cibuildwheel.environment",
"cibuildwheel.frontend",
"cibuildwheel.logger",
"cibuildwheel.options",
"cibuildwheel.selector",
"cibuildwheel.util",
"cibuildwheel.util.cmd",
"cibuildwheel.util.file",
"cibuildwheel.util.helpers",
"cibuildwheel.util.packaging",
"cibuildwheel.venv",
"collections",
"collections.abc",
"filelock",
"json",
"os",
"pathlib",
"platform",
"shutil",
"subprocess",
"textwrap",
"typing",
]

import dataclasses
import json
import os
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/projectfiles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__lazy_modules__ = ["configparser", "contextlib", "dependency_groups", "pathlib", "typing"]

import ast
import configparser
import contextlib
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/resources/_cross_venv.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This module is copied into the site-packages directory of an Android build environment, and
# activated via a .pth file when we want the environment to simulate Android.

__lazy_modules__ = ["os", "pathlib", "platform", "re", "sys", "sysconfig", "typing"]

import os
import platform
import re
Expand Down
2 changes: 2 additions & 0 deletions cibuildwheel/resources/_rust_shim.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python3

__lazy_modules__ = ["os", "pathlib", "shutil", "subprocess", "sys"]

import os
import shutil
import subprocess
Expand Down
Loading
Loading