Path: blob/main/test/lib/python3.9/site-packages/setuptools/errors.py
4798 views
"""setuptools.errors12Provides exceptions used by setuptools modules.3"""45from distutils import errors as _distutils_errors678# Re-export errors from distutils to facilitate the migration to PEP632910ByteCompileError = _distutils_errors.DistutilsByteCompileError11CCompilerError = _distutils_errors.CCompilerError12ClassError = _distutils_errors.DistutilsClassError13CompileError = _distutils_errors.CompileError14ExecError = _distutils_errors.DistutilsExecError15FileError = _distutils_errors.DistutilsFileError16InternalError = _distutils_errors.DistutilsInternalError17LibError = _distutils_errors.LibError18LinkError = _distutils_errors.LinkError19ModuleError = _distutils_errors.DistutilsModuleError20OptionError = _distutils_errors.DistutilsOptionError21PlatformError = _distutils_errors.DistutilsPlatformError22PreprocessError = _distutils_errors.PreprocessError23SetupError = _distutils_errors.DistutilsSetupError24TemplateError = _distutils_errors.DistutilsTemplateError25UnknownFileError = _distutils_errors.UnknownFileError2627# The root error class in the hierarchy28BaseError = _distutils_errors.DistutilsError293031class RemovedCommandError(BaseError, RuntimeError):32"""Error used for commands that have been removed in setuptools.3334Since ``setuptools`` is built on ``distutils``, simply removing a command35from ``setuptools`` will make the behavior fall back to ``distutils``; this36error is raised if a command exists in ``distutils`` but has been actively37removed in ``setuptools``.38"""394041class PackageDiscoveryError(BaseError, RuntimeError):42"""Impossible to perform automatic discovery of packages and/or modules.4344The current project layout or given discovery options can lead to problems when45scanning the project directory.4647Setuptools might also refuse to complete auto-discovery if an error prone condition48is detected (e.g. when a project is organised as a flat-layout but contains49multiple directories that can be taken as top-level packages inside a single50distribution [*]_). In these situations the users are encouraged to be explicit51about which packages to include or to make the discovery parameters more specific.5253.. [*] Since multi-package distributions are uncommon it is very likely that the54developers did not intend for all the directories to be packaged, and are just55leaving auxiliary code in the repository top-level, such as maintenance-related56scripts.57"""585960