-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
23 lines (22 loc) · 1 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import sys, os, platform
def setup(os_name: str) -> None:
if os_name == 'nt':
if 'pyveng.cfg' not in os.listdir():
os.system('python -m venv .')
else:
print("Directory already contains a virtual environmet")
os.system('.\Scripts\pip install customtkinter openpyxl mypy')
elif os_name == 'posix':
# when running under Debian 12 I found the need for some extra work
if 'debian' in os.uname().version.lower():
os.system('apt-get install python3-venv python3-tk -y')
os.system('python3 -m venv .')
elif 'arch' in platform.freedesktop_os_release()['ID']:
if 'pyvenv.cfg' not in os.listdir():
os.system('pacman -S tk')
os.system('python -m venv .')
else:
print("Directory already contains a virtual environmet")
else:
os.system('pip3 install customtkinter openpyxl')
os.system('./bin/pip install customtkinter openpyxl mypy')