File: python-wrapper

package info (click to toggle)
radare2 0.9.6-3.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 17,496 kB
  • ctags: 45,959
  • sloc: ansic: 240,999; sh: 3,645; makefile: 2,520; python: 1,212; asm: 312; ruby: 214; awk: 209; perl: 188; lisp: 169; java: 23; xml: 17; php: 6
file content (34 lines) | stat: -rwxr-xr-x 544 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# python wrapper trying to fix the python versioning hell
# -- pancake

PCS="${PYTHON_CONFIG}
	python2
	python25
	python2.5
	python26
	python2.6
	python27
	python2.7
	python28
	python2.8
	python"
PYCFG=""

for a in ${PCS} ; do
	$a --help >/dev/null 2>&1
	if [ $? = 0 ]; then
		PYCFG=$a
		PY3=`$a --version 2>&1 | grep 'Python 3'`
		[ -z "${PY3}" ] && break
	fi
done

[ -z "${PYCFG}" ] && exit 1
if [ "$1" = "-n" ]; then
	echo ${PYCFG}
	exit 0
fi

${PYCFG} $@ | sed -e 's/-arch [^\s]*//g' | \
	sed s,-Wstrict-prototypes,,g 2>/dev/null