-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathproject_paths.py
25 lines (22 loc) · 1.05 KB
/
project_paths.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import platform
from os import path
root_project_dir = path.abspath(path.dirname(__file__))
user_data_dir = path.join(root_project_dir, 'user_files')
settings_path = path.join(user_data_dir, 'settings.json')
ChatAI_module_dir = path.join(root_project_dir, 'ChatAI')
venv_path = path.join(user_data_dir, 'venv')
dotenv_path = path.join(user_data_dir, '.env')
version_file_path = path.join(root_project_dir, '.ankibrain-version')
bundled_deps_dor = path.join(user_data_dir, 'bundled_dependencies')
system = platform.system()
python_path = ''
venv_site_packages_path = ''
if system == 'Windows':
python_path = path.join(venv_path, 'Scripts', 'python.exe')
venv_site_packages_path = path.join(venv_path, 'Lib', 'site-packages')
elif system == 'Darwin':
python_path = path.join(venv_path, 'bin', 'python')
venv_site_packages_path = path.join(venv_path, 'lib', 'python3.9', 'site-packages')
elif system == 'Linux':
python_path = path.join(venv_path, 'bin', 'python')
venv_site_packages_path = path.join(venv_path, 'lib', 'python3.9', 'site-packages')