Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

68 lignes
3.0 KiB

  1. """setuptools.errors
  2. Provides exceptions used by setuptools modules.
  3. """
  4. from __future__ import annotations
  5. from distutils import errors as _distutils_errors
  6. # Re-export errors from distutils to facilitate the migration to PEP632
  7. ByteCompileError = _distutils_errors.DistutilsByteCompileError
  8. CCompilerError = _distutils_errors.CCompilerError
  9. ClassError = _distutils_errors.DistutilsClassError
  10. CompileError = _distutils_errors.CompileError
  11. ExecError = _distutils_errors.DistutilsExecError
  12. FileError = _distutils_errors.DistutilsFileError
  13. InternalError = _distutils_errors.DistutilsInternalError
  14. LibError = _distutils_errors.LibError
  15. LinkError = _distutils_errors.LinkError
  16. ModuleError = _distutils_errors.DistutilsModuleError
  17. OptionError = _distutils_errors.DistutilsOptionError
  18. PlatformError = _distutils_errors.DistutilsPlatformError
  19. PreprocessError = _distutils_errors.PreprocessError
  20. SetupError = _distutils_errors.DistutilsSetupError
  21. TemplateError = _distutils_errors.DistutilsTemplateError
  22. UnknownFileError = _distutils_errors.UnknownFileError
  23. # The root error class in the hierarchy
  24. BaseError = _distutils_errors.DistutilsError
  25. class InvalidConfigError(OptionError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
  26. """Error used for invalid configurations."""
  27. class RemovedConfigError(OptionError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
  28. """Error used for configurations that were deprecated and removed."""
  29. class RemovedCommandError(BaseError, RuntimeError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
  30. """Error used for commands that have been removed in setuptools.
  31. Since ``setuptools`` is built on ``distutils``, simply removing a command
  32. from ``setuptools`` will make the behavior fall back to ``distutils``; this
  33. error is raised if a command exists in ``distutils`` but has been actively
  34. removed in ``setuptools``.
  35. """
  36. class PackageDiscoveryError(BaseError, RuntimeError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
  37. """Impossible to perform automatic discovery of packages and/or modules.
  38. The current project layout or given discovery options can lead to problems when
  39. scanning the project directory.
  40. Setuptools might also refuse to complete auto-discovery if an error prone condition
  41. is detected (e.g. when a project is organised as a flat-layout but contains
  42. multiple directories that can be taken as top-level packages inside a single
  43. distribution [*]_). In these situations the users are encouraged to be explicit
  44. about which packages to include or to make the discovery parameters more specific.
  45. .. [*] Since multi-package distributions are uncommon it is very likely that the
  46. developers did not intend for all the directories to be packaged, and are just
  47. leaving auxiliary code in the repository top-level, such as maintenance-related
  48. scripts.
  49. """