summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-nose/PKGBUILD
blob: 5d36e018162b9fbbe44cda1bc86744cbf925321f (plain)
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
35
36
37
38
39
40
41
42
43
44
45
# $Id: PKGBUILD 144082 2011-12-03 05:50:51Z angvp $
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: Cilyan Olowen <gaknar@gmail.com>
pkgbase=python-nose
pkgname=('python2-nose' )
pkgver=1.1.2
pkgrel=3
pkgdesc="A discovery-based unittest extension"
arch=('any')
url="http://www.somethingaboutorange.com/mrl/projects/nose/"
license=('LGPL2')
source=("http://pypi.python.org/packages/source/n/nose/nose-${pkgver}.tar.gz")
makedepends=( 'python2' 'python2-distribute' )
md5sums=('144f237b615e23f21f6a50b2183aa817')

build() {
  cd "$srcdir/nose-$pkgver"
  sed -i -e "s:man/man1:share/man/man1:g" setup.py
  cp -R $srcdir/nose-$pkgver $srcdir/nose2-$pkgver
}

package_python-nose() {
  depends=('python' 'python-distribute')
  cd "$srcdir/nose-$pkgver"
  python setup.py install --prefix=/usr --root=${pkgdir}
  mv "$pkgdir/usr/bin/nosetests" "$pkgdir/usr/bin/nosetests3"
}

package_python2-nose() {
  depends=('python2' 'python2-distribute')
  cd "$srcdir/nose2-$pkgver"
  python2 setup.py install --prefix=/usr --root=${pkgdir}
  mv "$pkgdir/usr/bin/nosetests" "$pkgdir/usr/bin/nosetests2"
  rm -rf $pkgdir/usr/share
}

package_python-nose-doc(){
  pkgdesc="Nose documentation and examples"
  cd "$srcdir/nose-$pkgver/doc"
  make html
  mkdir -p "$pkgdir/usr/share/doc/python-nose"
  cp -r .build/html "$pkgdir/usr/share/doc/python-nose"
  cp -r ../examples "$pkgdir/usr/share/doc/python-nose"
}