-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsetup.py
49 lines (41 loc) · 1.28 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
import sys
from cx_Freeze import setup, Executable
import os
import sys
path=sys.prefix.replace('\\','/')
pathbin= path +'/Library/bin/'
os.environ['TCL_LIBRARY'] = path + '/tcl/tcl8.6'
os.environ['TK_LIBRARY'] = path + '/tcl/tk8.6'
base = None
if sys.platform == 'win32':
base = 'Console'
icon="Pictures/icon.ico"
includes=[ ]
include_files = ["Pictures/icon.ico","Pictures",('vide','Save-Projects')]
packages = ['mpl_toolkits',"PIL", "numpy", "scipy", "tkinter", "matplotlib"]
if sys.platform == 'win32':
executables = [
Executable('main.py', base=base, targetName='PyDEF3.exe', icon="Pictures/icon.ico")
]
exclude = ['scipy.spatial.cKDTree','sqlite3']
f=open('couilles.txt','r')
for line in f:
file = line[:-1]
try :
open(pathbin+file)
include_files.append(pathbin + file)
except:
pass
include_files = include_files+[path+'/Library/bin/libiomp5md.dll',path+'/Library/bin/mkl_intel_thread.dll']
else:
exclude = []
executables = [
Executable('main.py', base=base, targetName='PyDEF3.exe')
]
setup(
name = "PyDEF3",
version = "2.1",
description = "A Post-Treatment Software for VASP",
options = {'build_exe':{"packages":packages, "include_files":include_files,'excludes':exclude,'includes':includes}},
executables = executables
)