代码拉取完成,页面将自动刷新
#!/usr/bin/env bash
if [ "$1" = "--reverse" ]
then
cd autoload/leaderf/fuzzyMatch_C
rm -rf build
rm -f ../python/*.so ../python/*.dll
echo ========================================
echo ^_^ C extension uninstalled sucessfully!
echo ========================================
exit 0
fi
no_python=true
cd autoload/leaderf/fuzzyMatch_C
if command -v python2 > /dev/null 2>&1; then
no_python=false
echo "Begin to compile C extension of Python2 ..."
python2 setup.py build
if [ $? -eq 0 ]
then
cp build/lib*2.?/* ../python
if [ $? -eq 0 ]
then
echo
echo =================================================
echo ^_^ C extension of Python2 installed sucessfully!
echo =================================================
fi
fi
fi
if command -v python3 > /dev/null 2>&1; then
$no_python || echo
no_python=false
echo "Begin to compile C extension of Python3 ..."
python3 setup.py build
if [ $? -eq 0 ]
then
cp build/lib*3.?/* ../python
if [ $? -eq 0 ]
then
echo
echo =================================================
echo ^_^ C extension of Python3 installed sucessfully!
echo =================================================
fi
fi
fi
if $no_python; then
echo "Can't compile C extension, please install Python2 or Python3" >&2
exit 1
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。