+import os
+import shutil
+
+pwd = os.path.abspath(os.path.dirname(__file__))
+with open(os.path.join(pwd, "README.md"), encoding="utf-8") as f:
+ long_description = f.read()
+
+
+def mkdir(dir):
+ try:
+ os.makedirs(dir)
+ except FileExistsError:
+ pass
+
+
+if os.geteuid() == 0:
+ mkdir("/etc/lightcards/")
+ shutil.copyfile("./config.py", "/etc/lightcards/config.py")
+else:
+ xdg = os.environ.get("XDG_CONFIG_HOME")
+ home = os.path.expanduser("~")
+
+ if xdg:
+ mkdir(f"{xdg}/lightcards")
+ shutil.copyfile("./config.py", f"{xdg}/lightcards/config.py")
+ else:
+ mkdir(f"{home}/.config/lightcards")
+ shutil.copyfile("./config.py", f"{home}/.config/lightcards/config.py")
+