Merge pull request #7192 from AchmadFathoni/patch_conda_ta-lib
Add script for patching conda libta-lib
This commit is contained in:
commit
c08a89378d
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ user_data/notebooks/*
|
|||||||
freqtrade-plot.html
|
freqtrade-plot.html
|
||||||
freqtrade-profit-plot.html
|
freqtrade-profit-plot.html
|
||||||
freqtrade/rpc/api_server/ui/*
|
freqtrade/rpc/api_server/ui/*
|
||||||
|
build_helpers/ta-lib/*
|
||||||
|
|
||||||
# Macos related
|
# Macos related
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -4,7 +4,7 @@ else
|
|||||||
INSTALL_LOC=${1}
|
INSTALL_LOC=${1}
|
||||||
fi
|
fi
|
||||||
echo "Installing to ${INSTALL_LOC}"
|
echo "Installing to ${INSTALL_LOC}"
|
||||||
if [ ! -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
|
if [ -n "$2" ] && [ ! -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
|
||||||
tar zxvf ta-lib-0.4.0-src.tar.gz
|
tar zxvf ta-lib-0.4.0-src.tar.gz
|
||||||
cd ta-lib \
|
cd ta-lib \
|
||||||
&& sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h \
|
&& sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h \
|
||||||
@ -17,11 +17,17 @@ if [ ! -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
|
|||||||
cd .. && rm -rf ./ta-lib/
|
cd .. && rm -rf ./ta-lib/
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
which sudo && sudo make install || make install
|
if [ -z "$2" ]; then
|
||||||
if [ -x "$(command -v apt-get)" ]; then
|
which sudo && sudo make install || make install
|
||||||
echo "Updating library path using ldconfig"
|
if [ -x "$(command -v apt-get)" ]; then
|
||||||
sudo ldconfig
|
echo "Updating library path using ldconfig"
|
||||||
|
sudo ldconfig
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Don't install with sudo
|
||||||
|
make install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd .. && rm -rf ./ta-lib/
|
cd .. && rm -rf ./ta-lib/
|
||||||
else
|
else
|
||||||
echo "TA-lib already installed, skipping installation"
|
echo "TA-lib already installed, skipping installation"
|
||||||
|
@ -326,6 +326,16 @@ python3 -m pip install --upgrade pip
|
|||||||
python3 -m pip install -e .
|
python3 -m pip install -e .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Patch conda libta-lib (Linux only)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Ensure that the environment is active!
|
||||||
|
conda activate freqtrade-conda
|
||||||
|
|
||||||
|
cd build_helpers
|
||||||
|
bash install_ta-lib.sh ${CONDA_PREFIX} nosudo
|
||||||
|
```
|
||||||
|
|
||||||
### Congratulations
|
### Congratulations
|
||||||
|
|
||||||
[You are ready](#you-are-ready), and run the bot
|
[You are ready](#you-are-ready), and run the bot
|
||||||
|
Loading…
Reference in New Issue
Block a user