updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ipython-git / PKGBUILD
blobabf17bc1c9b7dd9c59644b6ba0592c8605f60435
1 pkgname=ipython-git
2 pkgver=20110922
3 pkgrel=1
4 pkgdesc="An enhanced Interactive Python shell in its current version from github."
5 url="http://ipython.org/"
6 license=('Revised BSD')
7 provides=("ipython=$pkgver" "ipython-docs=$pkgver")
8 conflicts=('ipython' 'ipython-docs')
9 arch=('any')
10 depends=('python2')
11 makedepends=('git' 'python2-distribute')
12 optdepends=("python-pexpect: for irunner"
13             "python2-nose: if you want to run IPython's test suite"
14             "python2-pyzmq: for parallel computing"
15             "python2-pyqt: for qtconsole GUI"
16             "pyside: alternative to PyQt for qtconsole GUI"
17             "python2-pygments: for syntax highlighting in qtconsole"
18             "python2-tornado: for html frontend"
20 source=()
21 md5sums=()
23 _gitroot="git://github.com/ipython/ipython.git"
24 _gitname="ipython"
26 build() {
27   true  # nothing to do here
30 package() {
31   cd "$srcdir"
32   msg "Cloning Git repository..."
34   if [ -d $_gitname ] ; then
35     cd $_gitname && git pull origin
36     msg "Local files were updated"
37   else
38     git clone $_gitroot $_gitname
39   fi
41   msg "Git checkout done or server timeout"
42   msg "Starting make..."
44   rm -rf "$srcdir/$_gitname-build"
45   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
46   cd "$srcdir/$_gitname-build"
48   # replace "/usr/bin/env python" with "/usr/bin/env python2"
49   find -name "*.py" -exec \
50     sed -i s,"/usr/bin/env python$","/usr/bin/env python2", "{}" \;
52   # install BSD style license
53   install -Dm644 docs/source/about/license_and_copyright.txt "$pkgdir/usr/share/licenses/ipython/license.txt"
55   python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1