You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB

  1. from calculate.variables.datavars import (
  2. Variable,
  3. Namespace,
  4. Dependence,
  5. StringType,
  6. BooleanType,
  7. HashType,
  8. ListType,
  9. Calculate,
  10. Copy
  11. )
  12. from calculate.vars.main.os.func import get_arch_gentoo
  13. from calculate.vars.install.os.func import (get_audio_selected,
  14. get_available_audio_system)
  15. def import_variables():
  16. with Namespace("arch"):
  17. Variable("machine", type=StringType,
  18. source=Copy("main.os.arch.machine"))
  19. Variable("gentoo", type=StringType,
  20. source=Calculate(get_arch_gentoo, ".machine"))
  21. with Namespace("audio"):
  22. Variable("available", type=ListType,
  23. source=Calculate(
  24. get_available_audio_system))
  25. Variable("selected", type=StringType,
  26. source=Calculate(
  27. get_audio_selected,
  28. ".available",
  29. "main.cl.cmdline.calculate.audio"))
  30. Variable("subsystem", type=StringType, source=Copy("main.os.subsystem"))
  31. with Namespace("container"):
  32. Variable("type", type=StringType,
  33. source=Copy("main.os.container.type"))
  34. with Namespace("linux"):
  35. Variable("shortname", type=StringType,
  36. source=Copy("main.os.linux.shortname"))
  37. Variable("name", type=StringType,
  38. source=Copy("main.os.linux.name"))
  39. Variable("subname", type=StringType,
  40. source=Copy("main.os.linux.subname"))
  41. Variable("system", type=StringType,
  42. source=Copy("main.os.linux.system"))
  43. Variable("ver", type=StringType,
  44. source=Copy("main.os.linux.ver"))
  45. Variable("build", type=StringType,
  46. source=Copy("main.os.linux.build"))