This commit is contained in:
Kivi Kaitaniemi
2024-04-26 20:47:04 +03:00
parent fa6aee8d66
commit 114c173c25
8 changed files with 397 additions and 52 deletions
+19
View File
@@ -0,0 +1,19 @@
# from import is ok for importing classes and functions
# just remember to not import variables this way
from decman import Module, sh
import decman
class MyModule(Module):
def __init__(self):
self.pkgs = ["rust"]
super().__init__("Example module", True, "1")
def enable_my_custom_feature(self, b: bool):
if b:
self.pkgs = ["rustup"]
def pacman_packages(self) -> list[str]:
return self.pkgs