python310/pythondeps310.sh

23 lines
446 B
Bash
Raw Normal View History

#!/bin/sh
[ $# -ge 1 ] || {
cat > /dev/null
exit 0
}
PYVER=`python3.10 -c "import sys; v=sys.version_info[:2]; print ('%d.%d'%v)"`
case $1 in
-P|--provides)
shift
grep "/usr/lib[^/]*/libpython${PYVER}\..*\.so.*\$" >/dev/null && echo "python(abi) = ${PYVER}"
exit 0
;;
-R|--requires)
shift
grep "/usr/\(lib[^/]*\|share\)/python${PYVER}/" >/dev/null && echo "python(abi) = ${PYVER}"
exit 0
;;
esac
exit 0