1 # Contributor: Kyle Keen <keenerd@gmail.com>
5 pkgdesc="A Python shell which is designed to be reliable and fun."
7 url="http://dreampie.sourceforge.net"
9 depends=('pygtksourceview2')
11 source=(http://launchpad.net/$pkgname/trunk/$pkgver/+download/$pkgname-$pkgver.tar.gz)
12 md5sums=('57ced153616069ca6c3c7d37bb30633a')
15 cd "$srcdir/$pkgname-$pkgver"
17 # glade bugs out crazy, don't know how to fix for real
18 #sed -i 's|data_dir = find_data_dir()|data_dir = "/usr/share"|g' dreampielib/gui/__init__.py
21 find ./ -type f -name '*.py' | xargs -n 1 sed -i 's|/usr/bin/env python|/usr/bin/env python2|'
22 find ./ -type f -executable | xargs -n 1 sed -i 's|/usr/bin/env python|/usr/bin/env python2|'
23 find ./ -type f -name '*.py' | xargs -n 1 sed -i 's|/usr/bin/python|/usr/bin/python2|'
24 find ./ -type f -executable | xargs -n 1 sed -i 's|/usr/bin/python|/usr/bin/python2|'
26 # python3 patch from Stunts
27 sed -i "s/sys.setdefaultencoding('utf-8')/import platform\nif not \"3.2\" in platform.python_version():\n sys.setdefaultencoding('utf-8')/" share/dreampie/subp_main.py
29 python2 setup.py build
30 python2 setup.py install --prefix=/usr --root="$pkgdir"