custom_components.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. """Constants for the custom components."""
  2. from __future__ import annotations
  3. from types import SimpleNamespace
  4. class CustomComponents(SimpleNamespace):
  5. """Constants for the custom components."""
  6. # The name of the custom components source directory.
  7. SRC_DIR = "custom_components"
  8. # The name of the custom components pyproject.toml file.
  9. PYPROJECT_TOML = "pyproject.toml"
  10. # The name of the custom components package README file.
  11. PACKAGE_README = "README.md"
  12. # The name of the custom components package .gitignore file.
  13. PACKAGE_GITIGNORE = ".gitignore"
  14. # The name of the distribution directory as result of a build.
  15. DIST_DIR = "dist"
  16. # The name of the init file.
  17. INIT_FILE = "__init__.py"
  18. # Suffixes for the distribution files.
  19. DISTRIBUTION_FILE_SUFFIXES = [".tar.gz", ".whl"]
  20. # The name to the URL of python package repositories.
  21. REPO_URLS = {
  22. # Note: the trailing slash is required for below URLs.
  23. "pypi": "https://upload.pypi.org/legacy/",
  24. "testpypi": "https://test.pypi.org/legacy/",
  25. }
  26. # The .gitignore file for the custom component project.
  27. FILE = ".gitignore"
  28. # Files to gitignore.
  29. DEFAULTS = {"__pycache__/", "*.py[cod]", "*.egg-info/", "dist/"}