-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
62 lines (54 loc) · 1.56 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# coding=utf-8
from setuptools import setup, find_packages
import os
import sys
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit()
path = os.path.dirname(os.path.realpath(__file__))
print(path)
sys.path.insert(0, path)
#When setuptools run it pulls these tools from Pypi
os.system('git update-index --assume-unchanged app/config/secret.yaml')
def require_venv():
try:
venv_dir = (os.path.isdir('venv'))
if venv_dir == False:
print('Creating venv directory...\n')
os.system('virtualenv --python python3 venv')
venv_active = hasattr(sys,'real_prefix')
if venv_active == False:
print('Activating venv...\n')
activate_file = "venv/bin/activate_this.py"
exec(compile(open(activate_file).read(), activate_file, 'exec'), dict(__file__=activate_file))
except Exception as e:
print('This setup requires virtualenv.')
INSTALL_REQUIRES = [
"Flask",
"Jinja2",
"peewee",
"wtf-peewee",
"XlsxWriter",
"PyYAML",
"email_validator",
"Flask-Script",
"flask-mysqldb",
"flask-login",
"bcrypt",
"flask_security",
"bleach",
"pytz"
]
def parameters():
name="Ullman Galleries"
description="A gallery entry application management software"
long_description = open("README.md").read()
install_requires = INSTALL_REQUIRES
packages = find_packages(where="app")
package_dir = {
"": "app",
}
include_package_data=True
return locals()
require_venv()
setup(**parameters())