# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-typing _pkgname=typing pkgver=3.7.4.1 pkgrel=1 pkgdesc="Typing – Type Hints for Python" url="https://pypi.python.org/pypi/typing/" arch="noarch" license="PSF" # Tests are missing in the release tarball options="!check" makedepends="py3-setuptools py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py test python3 setup.py test } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="5f5080bf66b1de094b7984ed3d1de22651de8ca018ffde927dfa67fe65b13f91602a877faa24e73d44558638b609be276b924b894d63999bb93b0657a2d5ec6e py-typing-3.7.4.1.tar.gz"