opnsense-ports/net-p2p/c-lightning/files/check_python_plugins_deps.sh
Franco Fichtner 4bf7251dc9 */*: sync with upstream
Taken from: FreeBSD
2024-06-20 13:34:26 +02:00

23 lines
870 B
Bash
Executable file

#!/usr/bin/env bash
declare -A requirements=(["plugins/clnrest/requirements.txt"]="CLNRESTDEPS_RUN_DEPENDS"
["plugins/wss-proxy/requirements.txt"]="WSSPROXYDEPS_RUN_DEPENDS")
for file in ${!requirements[@]} ; do
make_var="${requirements[${file}]}"
ok=1
for req in $(grep -E '^[^[:space:]]' "$(make -V WRKSRC)/${file}" |cut -f 1 -d =) ; do
# "cryptography" is handled separately via USE_PYTHON+=cryptography
# "pkgutil-resolve-name" is included in Python 3.9
if [ "${req}" != "cryptography" -a \
"${req}" != "pkgutil-resolve-name" -a \
-z "$(make -V "${make_var}" |grep -i "$(make -V PYTHON_PKGNAMEPREFIX)${req/-/.}>")" ] ; then
echo "missing in ${file}: ${req}"
ok=0
fi
done
if [ ${ok} -eq 1 ] ; then
echo "ok: ${file}"
fi
done