-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
executable file
·111 lines (103 loc) · 4.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/python3.5
# -*- coding: utf-8 -*-
#
# Dependencies are automatically detected, but it might need
# Fine tuning Linux: "sudo python3.5 setup.py build"
# Usar python en Macos bdist_dmg
# Or in python windows: "python3.5 setup.py bdist_msi"
# Error subsane with :
# pip install --upgrade setuptools
# pip install --upgrade distribute
#
import sys
import os.path
import glob
from codecs import open
from cx_Freeze import setup, Executable
build_options = dict(build_exe={'include_files': ['logging.conf', 'LICENSE', 'README.md', 'icons', 'pyvmwareclient.desktop'],
'packages': ['idna',
'cryptography',
'cffi',
'OpenSSL',
'webbrowser',
'setuptools',
'humanize',
'matplotlib',
'numpy',
'tkinter'],
'includes': [],
'excludes': []
},
bdist_mac={'iconfile': "./icons/vmwareclient.icns",
})
script = os.path.join("app.py")
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
if sys.platform == 'win32':
os.environ['TCL_LIBRARY'] = r'E:\python\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'E:\python\tcl\tk8.6'
exe = Executable(script='app.py',
targetName="pyvmwareclient.exe",
base="Win32GUI",
shortcutName='PyVMwareClient',
copyright='All Right reserver',
shortcutDir='DesktopFolder',
icon=os.path.join("icons", "vmwareclient.ico"))
else:
if sys.platform == 'Darwin':
os.environ['TCL_LIBRARY']=r'/System/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl'
os.environ['TK_LIBRARY']=r'/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk'
exe = Executable(script='app.py',
base='Console',
icon='./icons/vmwareclient.ico',
targetName='pyvmwareclient')
# For compile with MacOs High Sierra I need make adjus at sistem:
# sudo mkdir -p /Library/Frameworks/Tcl.framework/Versions/8.5
# sudo mkdir -p /Library/Frameworks/Tk.framework/Versions/8.5
# sudo cp -r /System/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl /Library/Frameworks/Tcl.framework/Versions/8.5
# sudo cp -r /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk /Library/Frameworks/Tk.framework/Versions/8.5
#
setup(name='pyvmwareclient',
version='0.4.1',
description='Client for Vcenter 6.0/6.5 VMware en python',
author='Mario Ezquerro',
author_email='[email protected]',
options=build_options,
maintainer="Mario Ezquerro",
maintainer_email="[email protected]",
url="https://github.com/wbugbofh/pyvmwareclient",
license='GNU',
classifiers=[
'Development Status :: 3 - BETA',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'Intended Audience :: Developers',
'Environment :: No Input/Output (Daemon)',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Distributed Computing',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
],
long_description=long_description,
#platforms=['Windows', 'Linux', 'Solaris', 'Mac OS-X', 'Unix'],
#zip_safe=True,
keywords='pyvmwareclient Client esxi and vmware',
#packages=['menu_action', 'wxgladegen', 'tools'],
#package_dir = {'menu_action':'action_vm'},
data_files=[
('app.py', glob.glob('app.py')),
('icons', glob.glob('icons/*')),
('images', glob.glob('images/*.png')),
('README.md', glob.glob('README.md')),
('logging.conf', glob.glob('logging.conf'))
],
executables=[exe],
requires=['cx_Freeze']
)