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>
9 pkgdesc="A discovery-based unittest extension"
11 url='https://readthedocs.org/docs/nose/'
13 depends=('python' 'python-setuptools')
14 source=("https://pypi.python.org/packages/source/n/nose/nose-${pkgver}.tar.gz"{,.asc})
15 sha512sums=('e65c914f621f8da06b9ab11a0ff2763d6e29b82ce2aaed56da0e3773dc899d9deb1f20015789d44c65a5dad7214520f5b659b3f8d7695fb207ad3f78e5cf1b62'
17 validpgpkeys=('58B277C0D208F7AC460C07C84548B3A8C0D70C12') # John Szakmeister <john@szakmeister.net>
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
26 sed -i 's/except ImportError:/except IOError:/' setup.py
31 2to3 -wn nose unit_tests functional_tests
32 python setup.py build build_tests
37 python selftest.py || echo "Tests failed"
42 python setup.py install --prefix=/usr --root="$pkgdir"
43 ln -s nosetests "$pkgdir"/usr/bin/nosetests3