Skip to content

Commit eba3b9f

Browse files
committed
chore: fix build for linux/macos
1 parent 2399f33 commit eba3b9f

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

tools/build_wheel_linux.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,31 @@ cd ta-lib-${TALIB_C_VER}
2727
mkdir -p include/ta-lib/
2828
cp include/*.h include/ta-lib/
2929

30+
31+
32+
# for version 0.4.0
33+
if [ $TALIB_C_VER == "0.4.0" ]; then
34+
bash autogen.sh
35+
# Build TA-Lib using autoconf/configure
36+
./configure --prefix=$(pwd)/../ta-lib-install
37+
if [ $? -ne 0 ]; then
38+
echo "Configure failed"
39+
exit 1
40+
fi
41+
42+
else
43+
# for version 0.6.2
44+
# Use CMake to configure the build
45+
cmake -G "$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_INSTALL_PREFIX=../../ta-lib-install ..
46+
if [ $? -ne 0 ]; then
47+
echo "CMake configuration failed"
48+
exit 1
49+
fi
50+
fi
3051
# Create build directory
3152
mkdir -p _build
3253
cd _build
3354

34-
# Use CMake to configure the build
35-
cmake -G "$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_INSTALL_PREFIX=../../ta-lib-install ..
36-
if [ $? -ne 0 ]; then
37-
echo "CMake configuration failed"
38-
exit 1
39-
fi
40-
4155
# Compile TA-Lib
4256
make
4357
if [ $? -ne 0 ]; then

tools/build_wheel_macos.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,31 @@ cd ta-lib-${TALIB_C_VER}
2727
mkdir -p include/ta-lib/
2828
cp include/*.h include/ta-lib/
2929

30+
31+
32+
# for version 0.4.0
33+
if [ $TALIB_C_VER == "0.4.0" ]; then
34+
bash autogen.sh
35+
# Build TA-Lib using autoconf/configure
36+
./configure --prefix=$(pwd)/../ta-lib-install
37+
if [ $? -ne 0 ]; then
38+
echo "Configure failed"
39+
exit 1
40+
fi
41+
42+
else
43+
# for version 0.6.2
44+
# Use CMake to configure the build
45+
cmake -G "$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_INSTALL_PREFIX=../../ta-lib-install ..
46+
if [ $? -ne 0 ]; then
47+
echo "CMake configuration failed"
48+
exit 1
49+
fi
50+
fi
3051
# Create build directory
3152
mkdir -p _build
3253
cd _build
3354

34-
# Use CMake to configure the build
35-
cmake -G "$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_INSTALL_PREFIX=../../ta-lib-install ..
36-
if [ $? -ne 0 ]; then
37-
echo "CMake configuration failed"
38-
exit 1
39-
fi
40-
4155
# Compile TA-Lib
4256
make
4357
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)