Debian Codegraph @

build-tools/pkgos-dh_auto_install

raw
1 #!/bin/sh
2
3 set -e
4 set -x
5
6 PKGOS_IN_TMP=no
7 for i in $@ ; do
8 case "${1}" in
9 "--no-py3")
10 echo "WARNING: --no-py3 is deprecated and always off."
11 shift
12 ;;
13 "--no-py2")
14 echo "WARNING: --no-py2 is deprecated and always on."
15 shift
16 ;;
17 "--in-tmp")
18 PKGOS_IN_TMP=yes
19 shift
20 ;;
21 *)
22 ;;
23 esac
24 done
25
26 SRC_PKG_NAME=$(dpkg-parsechangelog -SSource)
27 PY_MODULE_NAME=$(echo ${SRC_PKG_NAME} | sed s/python-//)
28
29 PYTHON3S=$(py3versions -vr 2>/dev/null)
30
31 if [ "${PKGOS_IN_TMP}" = "yes" ] ; then
32 TARGET_DIR=tmp
33 else
34 TARGET_DIR=python3-${PY_MODULE_NAME}
35 fi
36 for pyvers in ${PYTHON3S}; do
37 python${pyvers} setup.py install --install-layout=deb --root $(pwd)/debian/${TARGET_DIR}
38 done
39 rm -rf $(pwd)/debian/python*/usr/lib/python*/dist-packages/*.pth
40 rm -rf $(pwd)/debian/tmp/usr/lib/python*/dist-packages/*.pth