File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
from flask import Flask
2
2
from pathlib import Path
3
3
from flask_sqlalchemy import SQLAlchemy
4
+ from appdirs import user_data_dir
4
5
5
6
from numcodecs import compat_ext # Needed for pyinstaller
6
7
from numcodecs import blosc # Needed for pyinstaller
17
18
#centralizing path across app
18
19
cwd_path = Path .cwd ()
19
20
21
+ ## uncomment block if not on O2
20
22
if getattr (sys , 'frozen' , False ):
21
23
data_path = Path (Path (sys .executable ).parent / 'data' )
22
24
multiprocessing .freeze_support ()
23
25
else :
24
26
data_path = Path ("minerva_analysis/data" ).resolve ()
27
+
28
+ ## uncomment block if on O2
29
+ # appname = "minerva_analysis"
30
+ # appauthor = "lsp"
31
+ # data_path = Path(user_data_dir(appname, appauthor)+'/data').resolve()
32
+ # if getattr(sys, 'frozen', False):
33
+ # multiprocessing.freeze_support()
34
+
25
35
# print('Data Path', str(data_path), str((data_path).resolve()))
26
36
# Make the Data Path
27
37
data_path .mkdir (parents = True , exist_ok = True )
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ dependencies:
7
7
- jinja2==3.0.3
8
8
- werkzeug==2.0.3
9
9
- itsdangerous==2.0.1
10
+ - appdirs
10
11
- flask-sqlalchemy
11
12
- numpy
12
13
- ome-types
@@ -26,4 +27,3 @@ dependencies:
26
27
- opencv-python==4.5.3.56
27
28
28
29
29
-
You can’t perform that action at this time.
0 commit comments