diff --git a/python2-mechanize/PKGBUILD b/python2-mechanize/PKGBUILD index b87ed151e..99f7dfcf2 100644 --- a/python2-mechanize/PKGBUILD +++ b/python2-mechanize/PKGBUILD @@ -1,27 +1,36 @@ -# -# Apps Packages for Chakra, part of chakra-project.org -# -# Maintainer: Adrian Chaves Fernandez (Gallaecio) -# Contributor (x86_64): Giuseppe CalĂ  - pkgname=python2-mechanize _pkgname=mechanize -pkgver=0.2.5 +pkgver=0.3.7 pkgrel=1 pkgdesc="Stateful programmatic web browsing in Python" arch=(any) url="http://wwwsearch.sourceforge.net/mechanize/" license=(BSD ZPL) -depends=(python2) -replaces=(python-mechanize) -provides=(python-mechanize) -makedepends=(setuptools) -source=(http://wwwsearch.sourceforge.net/$_pkgname/src/$_pkgname-$pkgver.tar.gz) -md5sums=('32657f139fc2fb75bcf193b63b8c60b2') +depends=('python2' 'python2-html5lib') +optdepends=('python2-html5-parser: faster parsing of HTML') +makedepends=(python2-setuptools) +checkdepends=('python2-zope-interface' 'python2-twisted') +source=("https://pypi.io/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"{,.asc}) +sha256sums=('ee66e1a6af790898894dd0318914ced413d94f46a54f881eb337081ff9702cd2' + 'SKIP') +validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New longer key) -package() { - cd "$srcdir/$_pkgname-$pkgver" - python2 setup.py install --root="$pkgdir" --optimize=1 - install -D -m644 "$srcdir/$_pkgname-$pkgver/COPYING.txt" "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt" +build() { + cd "mechanize-$pkgver" + + python2 setup.py build +} + +check() { + cd "mechanize-$pkgver" + + python2 run_tests.py +} + +package() { + cd "mechanize-$pkgver" + + python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }