diff --git a/cx_Freeze/__init__.py b/cx_Freeze/__init__.py index ab03f71e4..6e83299aa 100644 --- a/cx_Freeze/__init__.py +++ b/cx_Freeze/__init__.py @@ -2,18 +2,17 @@ and is cross-platform. """ # pylint: disable=invalid-name - from __future__ import annotations import sys import setuptools -from .command.build_exe import BuildEXE as build_exe -from .command.install import Install as install -from .command.install_exe import InstallEXE as install_exe -from .finder import Module, ModuleFinder -from .freezer import ConstantsModule, Executable, Freezer +from cx_Freeze.command.build_exe import BuildEXE as build_exe +from cx_Freeze.command.install import Install as install +from cx_Freeze.command.install_exe import InstallEXE as install_exe +from cx_Freeze.finder import Module, ModuleFinder +from cx_Freeze.freezer import ConstantsModule, Executable, Freezer __all__ = [ "build_exe", @@ -29,17 +28,17 @@ ] if sys.platform == "win32": - from .command.bdist_msi import BdistMSI as bdist_msi + from cx_Freeze.command.bdist_msi import BdistMSI as bdist_msi __all__.append(bdist_msi.__name__) elif sys.platform == "darwin": - from .command.bdist_mac import BdistDMG as bdist_dmg - from .command.bdist_mac import BdistMac as bdist_mac + from cx_Freeze.command.bdist_mac import BdistDMG as bdist_dmg + from cx_Freeze.command.bdist_mac import BdistMac as bdist_mac __all__.extend([bdist_dmg.__name__, bdist_mac.__name__]) else: - from .command.bdist_deb import BdistDEB as bdist_deb - from .command.bdist_rpm import BdistRPM as bdist_rpm + from cx_Freeze.command.bdist_deb import BdistDEB as bdist_deb + from cx_Freeze.command.bdist_rpm import BdistRPM as bdist_rpm __all__.extend([bdist_deb.__name__, bdist_rpm.__name__]) diff --git a/cx_Freeze/_typing.py b/cx_Freeze/_typing.py index eed5276ee..a50dfc950 100644 --- a/cx_Freeze/_typing.py +++ b/cx_Freeze/_typing.py @@ -4,7 +4,7 @@ from pathlib import Path, PurePath from typing import List, Optional, Tuple, Union -from .module import Module +from cx_Freeze.module import Module DeferredList = List[Tuple[Module, Module, List[str]]] diff --git a/cx_Freeze/cli.py b/cx_Freeze/cli.py index 01fa97979..8dadd05ef 100644 --- a/cx_Freeze/cli.py +++ b/cx_Freeze/cli.py @@ -1,5 +1,4 @@ """cxfreeze command line tool.""" - from __future__ import annotations import argparse @@ -7,10 +6,10 @@ import sys import sysconfig -from . import __version__ -from .common import normalize_to_list -from .executable import Executable -from .freezer import Freezer +from cx_Freeze import __version__ +from cx_Freeze.common import normalize_to_list +from cx_Freeze.executable import Executable +from cx_Freeze.freezer import Freezer __all__ = ["main"] diff --git a/cx_Freeze/common.py b/cx_Freeze/common.py index 17e4f1a38..cad699872 100644 --- a/cx_Freeze/common.py +++ b/cx_Freeze/common.py @@ -1,5 +1,4 @@ """Common utility functions shared between cx_Freeze modules.""" - from __future__ import annotations import shutil @@ -8,8 +7,8 @@ from textwrap import dedent from types import CodeType -from ._typing import IncludesList, InternalIncludesList -from .exception import OptionError +from cx_Freeze._typing import IncludesList, InternalIncludesList +from cx_Freeze.exception import OptionError class FilePath(Path): diff --git a/cx_Freeze/darwintools.py b/cx_Freeze/darwintools.py index 649c3a18f..3b5835900 100644 --- a/cx_Freeze/darwintools.py +++ b/cx_Freeze/darwintools.py @@ -9,7 +9,7 @@ import tempfile from collections.abc import Iterable from pathlib import Path -from .exception import PlatformError +from cx_Freeze.exception import PlatformError # In a MachO file, need to deal specially with links that use @executable_path, diff --git a/cx_Freeze/executable.py b/cx_Freeze/executable.py index 9ddb285b9..bb39d9f87 100644 --- a/cx_Freeze/executable.py +++ b/cx_Freeze/executable.py @@ -1,5 +1,4 @@ """Module for the Executable base class.""" - from __future__ import annotations import os @@ -10,9 +9,9 @@ from setuptools import Distribution -from ._compat import IS_MINGW, IS_WINDOWS -from .common import get_resource_file_path -from .exception import OptionError, SetupError +from cx_Freeze._compat import IS_MINGW, IS_WINDOWS +from cx_Freeze.common import get_resource_file_path +from cx_Freeze.exception import OptionError, SetupError STRINGREPLACE = list( string.whitespace + string.punctuation.replace(".", "").replace("_", "") diff --git a/cx_Freeze/finder.py b/cx_Freeze/finder.py index ce6521c80..d2f73cd4f 100644 --- a/cx_Freeze/finder.py +++ b/cx_Freeze/finder.py @@ -24,8 +24,7 @@ get_resource_file_path, process_path_specs, ) - -from .module import ConstantsModule, Module +from cx_Freeze.module import ConstantsModule, Module ALL_SUFFIXES = importlib.machinery.all_suffixes() diff --git a/cx_Freeze/freezer.py b/cx_Freeze/freezer.py index 3dca7bfec..41dee90ca 100644 --- a/cx_Freeze/freezer.py +++ b/cx_Freeze/freezer.py @@ -20,14 +20,14 @@ from typing import Any from zipfile import ZIP_DEFLATED, ZIP_STORED, PyZipFile, ZipInfo -from ._compat import IS_MACOS, IS_MINGW, IS_WINDOWS -from ._typing import IncludesList, InternalIncludesList -from .common import get_resource_file_path, process_path_specs -from .exception import FileError, OptionError -from .executable import Executable -from .finder import ModuleFinder -from .module import ConstantsModule, Module -from .parser import ELFParser, Parser, PEParser +from cx_Freeze._compat import IS_MACOS, IS_MINGW, IS_WINDOWS +from cx_Freeze._typing import IncludesList, InternalIncludesList +from cx_Freeze.common import get_resource_file_path, process_path_specs +from cx_Freeze.exception import FileError, OptionError +from cx_Freeze.executable import Executable +from cx_Freeze.finder import ModuleFinder +from cx_Freeze.module import ConstantsModule, Module +from cx_Freeze.parser import ELFParser, Parser, PEParser if IS_WINDOWS or IS_MINGW: with suppress(ImportError): diff --git a/cx_Freeze/hooks/__init__.py b/cx_Freeze/hooks/__init__.py index d5b9e31eb..b66b3e75c 100644 --- a/cx_Freeze/hooks/__init__.py +++ b/cx_Freeze/hooks/__init__.py @@ -3,7 +3,6 @@ """ # pylint: disable=invalid-name # ruff: noqa: ARG001 - from __future__ import annotations import sys @@ -11,10 +10,10 @@ from contextlib import suppress from pathlib import Path -from .._compat import IS_MACOS, IS_MINGW, IS_WINDOWS -from ..finder import ModuleFinder -from ..module import Module -from ._qthooks import get_qt_plugins_paths # noqa: F401 +from cx_Freeze._compat import IS_MACOS, IS_MINGW, IS_WINDOWS +from cx_Freeze.finder import ModuleFinder +from cx_Freeze.hooks._qthooks import get_qt_plugins_paths # noqa: F401 +from cx_Freeze.module import Module def load_aiofiles(finder: ModuleFinder, module: Module) -> None: diff --git a/cx_Freeze/module.py b/cx_Freeze/module.py index 2bda27248..28538613d 100644 --- a/cx_Freeze/module.py +++ b/cx_Freeze/module.py @@ -1,5 +1,4 @@ """Base class for Module and ConstantsModule.""" - from __future__ import annotations import ast @@ -14,8 +13,8 @@ from pathlib import Path from types import CodeType -from ._compat import importlib_metadata -from .exception import ModuleError, OptionError +from cx_Freeze._compat import importlib_metadata +from cx_Freeze.exception import ModuleError, OptionError __all__ = ["ConstantsModule", "Module", "ModuleHook"] diff --git a/cx_Freeze/winversioninfo.py b/cx_Freeze/winversioninfo.py index c50f57d48..95e764528 100644 --- a/cx_Freeze/winversioninfo.py +++ b/cx_Freeze/winversioninfo.py @@ -1,5 +1,4 @@ """Module for the VersionInfo base class.""" - from __future__ import annotations import argparse @@ -8,7 +7,7 @@ from pathlib import Path from struct import calcsize, pack -from ._compat import packaging +from cx_Freeze._compat import packaging try: from win32verstamp import stamp as version_stamp