archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-httpretty / trunk / PKGBUILD
bloba02bafbf0b0b23dfdaea841e0149588f24742825
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-httpretty
4 pkgver=1.1.4
5 pkgrel=7
6 pkgdesc="HTTP client mock for Python"
7 arch=('any')
8 url="https://github.com/gabrielfalcao/httpretty"
9 license=('MIT')
10 depends=('python-urllib3')
11 makedepends=('python-setuptools')
12 checkdepends=('python-nose' 'python-coverage' 'python-eventlet' 'python-freezegun' 'python-httplib2'
13               'python-redis' 'python-requests' 'python-sure' 'python-tornado'
14               'python-httpx' 'python-boto3')
15 source=("https://github.com/gabrielfalcao/HTTPretty/archive/$pkgver/$pkgname-$pkgver.tar.gz"
16         $pkgname-drop-mock.patch::https://github.com/gabrielfalcao/HTTPretty/pull/452.patch)
17 sha512sums=('58c733ba4719f97e06e2313bb6b94f1c6609d3facb2e0262ac37be97f1c3430eac661611ba9b3712c9c1809846e177b61f3fc2945f3770d475f70b81bea2aced'
18             '5520594ddb2e73d75c6eb8476dc1984464306614d915627c0c9e69815a5671d65e286e90f3ee926daa040f9f24a81835eb5c7993e620a5b67aaaefa06571dcb2')
20 prepare() {
21   cd HTTPretty-$pkgver
22   patch -p1 -i ../$pkgname-drop-mock.patch
23   sed -i '/rednose/d' setup.cfg
26 build() {
27   cd HTTPretty-$pkgver
28   python setup.py build
31 check() {
32   cd HTTPretty-$pkgver
33   # https://github.com/gabrielfalcao/HTTPretty/issues/457
34   nosetests3 -s tests -e test_httpretty_should_handle_paths_starting_with_two_slashes
37 package() {
38   cd HTTPretty-$pkgver
39   python setup.py install --root="$pkgdir" --optimize=1
40   install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/