OCaml 4.14.0 rebuild
[arch-packages.git] / python-nose / trunk / PKGBUILD
blob370b23322cbe9f27c83d13de212c8759e540c2ca
1 # Maintainer: Dan McGee <dan@archlinux.org>
2 # Contributor: Angel Velasquez <angvp@archlinux.org>
3 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
4 # Contributor: Cilyan Olowen <gaknar@gmail.com>
6 pkgname=python-nose
7 pkgver=1.3.7
8 pkgrel=14
9 pkgdesc="A discovery-based unittest extension"
10 arch=('any')
11 url='https://readthedocs.org/docs/nose/'
12 license=('LGPL2.1')
13 depends=('python' 'python-setuptools')
14 source=("https://pypi.python.org/packages/source/n/nose/nose-${pkgver}.tar.gz"{,.asc})
15 sha512sums=('e65c914f621f8da06b9ab11a0ff2763d6e29b82ce2aaed56da0e3773dc899d9deb1f20015789d44c65a5dad7214520f5b659b3f8d7695fb207ad3f78e5cf1b62'
16             'SKIP')
17 validpgpkeys=('58B277C0D208F7AC460C07C84548B3A8C0D70C12') # John Szakmeister <john@szakmeister.net>
19 prepare() {
20   cd nose-$pkgver
21   sed -i -e "s:man/man1:share/man/man1:g" setup.py
23   # setuptools 58 removed support for 2to3
24   sed -i "s/'use_2to3': True,//" setup.py
25   sed -i 's/from setuptools.command.build_py import Mixin2to3/from distutils.util import Mixin2to3/' setup3lib.py
28 build() {
29   cd nose-$pkgver
30   2to3 -wn nose unit_tests functional_tests
31   python setup.py build build_tests
34 check() {
35   cd nose-$pkgver
36   python selftest.py || echo "Tests failed"
39 package() {
40   cd nose-$pkgver
41   python setup.py install --prefix=/usr --root="$pkgdir"
42   ln -s nosetests "$pkgdir"/usr/bin/nosetests3