-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild_scipy.bat.in
24 lines (20 loc) · 1.18 KB
/
build_scipy.bat.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@echo off
set PATH=${MINGW_PATH};${ILASTIK_DEPENDENCY_DIR}/bin;%PATH%
rem find libgcc*.dll
for /f "delims=" %%a in ('dir /b "${ILASTIK_DEPENDENCY_DIR_DOS}\bin\libgcc*.dll"') do @set LIBGCC=%%a
set LIBGCC=%LIBGCC:.dll=%
rem find libgcc.a and copy it to ilastik libdir (needed to get __chkstk_ms() )
for /f "delims=" %%a in ('dir /s /b "${MINGW_PATH}\..\lib\*libgcc.a" ^| find /v "\32\"') do @set LIBGCCA=%%a
copy "%LIBGCCA%" ${ILASTIK_DEPENDENCY_DIR_DOS}\lib\libgcc.lib
if "${ILASTIK_BITNESS}" == "64" (
rem 64-bit mingw needs emulate_c99
${PYTHON_EXE} setup.py build_ext -l "%LIBGCC% libgfortran-3 emulate_c99 libgcc" -L ${ILASTIK_DEPENDENCY_DIR}/lib install
) else (
rem 32-bit mingw already contains the C99 functions. libgcc and libgfortran are
rem automatically included by numpy/distutils on this platform.
${PYTHON_EXE} setup.py build_ext -l "libgcc" -L ${ILASTIK_DEPENDENCY_DIR}/lib install
)
rem Do not build with '-c mingw32' because this would use gcc for linking, leading to crashes.
rem For the same reason, never start 'devenv' in a git/msys bash shell!
rem Without this flag, mingw will only be used for Fortran sources, and gfortran
rem is automatically found in the PATH.