forked from Quandela/CAMFR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
machine_cfg.py.MSVC
79 lines (58 loc) · 2.09 KB
/
machine_cfg.py.MSVC
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
# This Python script contains all the machine dependent settings
# needed during the build process.
# Compilers to be used.
cc = "cl.exe"
cxx = "cl.exe"
f77 = ""
debug = False
link = "link.exe"
link_flags = "/DLL /nologo /LIBPATH:C:\PYTHON25\libs \
/EXPORT:init_camfr /NODEFAULTLIB:libc.lib /INCREMENTAL:NO"
if debug == True:
link_flags += " /DEBUG"
# Compiler flags.
#
# Note: for the Fortran name definition you can define one of the following
# preprocessor macros:
#
# FORTRAN_SYMBOLS_WITHOUT_TRAILING_UNDERSCORES
# FORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE
# FORTRAN_SYMBOLS_WITH_DOUBLE_TRAILING_UNDERSCORES
if debug == False:
base_flags = "-DFORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE -DNDEBUG \
/nologo /MD /GR /GX /W0"
flags = base_flags + " /Ox"
else:
base_flags = "-DFORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE -DDEBUG \
/nologo /MD /GR /GX /W0 /Zi"
flags = base_flags
flags_noopt = base_flags
fflags = flags
# Include directories.
include_dirs = ["C:/Python25/include",
"C:/Python25/Lib/site-packages",
"E:/lib/blitz-0.9",
"E:/lib/boost/boost_1_33_1"]
# Library directories.
library_dirs = ["C:/Python25/libs",
"e:/lib/blitz-0.9/lib",
"e:/lib/boost/boost_1_33_1/libs/python/build/bin-stage",
"e:/lib/fortran"]
# Library names.
libs = ["boost_python", "python25", "blitz", "fortran", "gcc", "g2c"]
# Command to strip library of excess symbols:
dllsuffix = ".pyd"
strip_command = "strip --strip-unneeded camfr/_camfr" + dllsuffix
strip_command = ""
# all pil scripts and libs, something shorter once...?
import os
pilpath = "E:\\camfrcode/Pil1.1.6-py25/"
all_pil_files = os.listdir(pilpath)
pillist = []
for n in all_pil_files: pillist.append(pilpath+ n)
# Extra files to copy into installation directory.
extra_files = [(".",
["e:\\lib/boost/boost_1_33_1/libs/python/build/bin-stage/boost_python.dll"]),
("./.." , ["visualisation/pil.pth"]),
("pil" , pillist )
]