blob: 7ccd0761e71c65981f07a91951b04199d80b4450 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
[ $# -ge 1 ] || {
cat > /dev/null
exit 0
}
PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"`
case $1 in
-P|--provides)
shift
grep "/usr/bin/python\*\$" >& /dev/null && echo "python(abi) = ${PYVER}"
exit 0
;;
-R|--requires)
shift
grep "/usr/lib[^/]*/python${PYVER}/" >& /dev/null && echo "python(abi) = ${PYVER}"
exit 0
;;
esac
exit 0
|