Ai
3 Star 7 Fork 0

Gitee 极速下载/git_cdn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://gitlab.com/grouperenault/git_cdn.git
克隆/下载
patch_libs.sh 967 Bytes
一键复制 编辑 原始数据 按行查看 历史
Sebastien MICHEL 提交于 2024-11-27 23:54 +08:00 . feat: add nix develop and upgrade Makefile
#!/usr/bin/env bash
# This script is necessary on nix environment because not LHS (Linux Hierarchy Standard), so no
# dynamic link available
# This script patch libs *.so* from python packages to add others libs on ld_libs rpath.
# Also override system default library locations by nix packages (described on flake.nix devShell).
#
verbose=false
case $1 in
-v|--verbose|-d|--debug)
verbose=true
;;
esac
VENV=$(poetry env info --path)
[ -z "$VENV" ] && poetry install
VENV=$(poetry env info --path)
libs=$(find $VENV -name '*.so*')
LD_LIBS=$LD_LIBRARY_PATH_BASE:$(echo $libs |xargs dirname | sort -u | tr '\n' ':')
LD_LIBS=${LD_LIBS%:}
[ "$VENV" ] || { echo "No venv found" >&2; exit 1; }
for i in $libs
do
[ "${i%.orig}" != "$i" ] && continue
[ -f $i.orig ] || cp $i $i.orig
if $verbose; then
echo "*** Patching $i ***"
echo before:
ldd $i
fi
patchelf --set-rpath $LD_LIBS $i
if $verbose; then
echo after:
ldd $i
fi
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/git_cdn.git
git@gitee.com:mirrors/git_cdn.git
mirrors
git_cdn
git_cdn
master

搜索帮助