forked from AdaptiveScale/lxdui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
79 lines (76 loc) · 2.94 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# -*- coding: UTF-8 -*-
import os
from setuptools import setup, find_packages
#customize install
from setuptools.command.install import install
# app/__init__.py
from lxdui.app_metadata import __version__ as LXDUI_VERSION, __giturl__ as LXDUI_GITURL
class CustomizedInstallCommand(install):
def run(self):
os.system("echo '=============================='")
os.system("echo \"CURRENT VERSION: <"+LXDUI_VERSION+">\"")
#-----------------#PIP requirements
os.system("echo '=============================='")
os.system("echo 'PRE-INSTALL PHASE STARTED !!!'")
os.system("echo '=============================='")
#=================
os.system("sudo pip install setuptools -U")
os.system("sudo pip install requests==2.5.2")
#--- if there is errors try to install urllib3 MANUALLY ---
os.system("sudo pip install urllib3==1.8")
#--- if there is errors try to install urllib3 manually ---
os.system("sudo pip install pylxd==2.2.4")
#=================
os.system("sudo pip install netaddr==0.7.19")
os.system("sudo pip install Flask==0.12")
os.system("sudo pip install flask-login==0.4.0")
os.system("sudo pip install bs4==0.0.1")
#=================
os.system("echo '=============================='")
os.system("echo 'PRE-INSTALL PHASE FINISHED !!!'")
os.system("echo '=============================='")
#PRE-SCRIPT -> install LXD & ZFS
#dirname, filename = os.path.split(os.path.abspath(__file__))
#os.system("sudo chmod 755 {0}/pre-setup/{1}".format(dirname, "install_zfs_lxd_shell.sh"))
#os.system("sudo {0}/pre-setup/{1}".format(dirname, "install_zfs_lxd_shell.sh"))
#then the actual INSTALL from pythontools
install.run(self)
setup(
cmdclass={ 'install': CustomizedInstallCommand },
name='lxdui',
version = LXDUI_VERSION,
description='lxdui v{}'.format(LXDUI_VERSION),
long_description='lxdui v{}'.format(LXDUI_VERSION),
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 2.7',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Framework :: Flask',
'Topic :: System :: Containers',
'Topic :: System :: Clustering',
'Topic :: System :: Monitoring',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux'
],
keywords='lxc lxc-containers lxd',
author='AdaptiveScale, Inc.',
author_email='[email protected]',
url = LXDUI_GITURL,
license='Apache',
packages=['lxdui'],
include_package_data = True,
zip_safe=False,
install_requires=[
'netaddr==0.7.19',
'Flask==0.12',
'flask-login==0.4.0',
'bs4==0.0.1',
'pylxd==2.2.4'
],
entry_points={
'console_scripts': [
'lxdui = lxdui.app:main'
]
}
)