An interpreted, interactive, object-oriented programming language
CentOS Sources
2017-08-01 71084d584ff953f5463757ec6536406320560b4d
commit | author | age
6e8c2f 1 #!/bin/bash
CB 2
3 [ $# -ge 1 ] || {
4     cat > /dev/null
5     exit 0
6 }
7
8 case $1 in
9 -P|--provides)
10     shift
11     # Match buildroot/payload paths of the form
12     #    /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR
13     # generating a line of the form
14     #    python(abi) = MAJOR.MINOR
15     # (Don't match against -config tools e.g. /usr/bin/python2.6-config)
16     grep "/usr/bin/python.\..$" \
17         | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
18     ;;
19 -R|--requires)
20     shift
21     # Match buildroot paths of the form
22     #    /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/  and
23     #    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
24     # generating (uniqely) lines of the form:
25     #    python(abi) = MAJOR.MINOR
26     grep "/usr/lib[^/]*/python.\../.*" \
27         | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
28         | sort | uniq
29     ;;
30 esac
31
32 exit 0