1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
10 DESCRIPTION="HTTP client mock for Python"
11 HOMEPAGE="https://github.com/gabrielfalcao/httpretty"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
19 RDEPEND="dev-python/urllib3[${PYTHON_USEDEP}]
20 >=dev-python/coverage-3.5[${PYTHON_USEDEP}]
21 dev-python/httplib2[${PYTHON_USEDEP}]
22 >=dev-python/mock-1.0[${PYTHON_USEDEP}]
23 >=dev-python/nose-1.2[${PYTHON_USEDEP}]
24 >=dev-python/requests-1.1[${PYTHON_USEDEP}]
25 >=dev-python/steadymark-0.4.5[${PYTHON_USEDEP}]
26 >=dev-python/sure-1.2.1[${PYTHON_USEDEP}]
27 >=www-servers/tornado-2.2[${PYTHON_USEDEP}]
29 # I believe we don't need unpackaged package markment
30 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
33 PATCHES=( "${FILESDIR}"/${P}-deps.patch )
35 python_prepare_all() {
36 distutils-r1_python_prepare_all
43 # https://github.com/gabrielfalcao/HTTPretty/issues/125
44 nosetests tests/unit \
45 -e test_recording_calls \
46 -e test_playing_calls \
47 -e test_callback_setting_headers_and_status_response \
48 -e test_streaming_responses \
49 tests/functional || die "Tests failed under ${EPYTHON}"
50 rm -rf tests/ "${BUILD_DIR}"/lib/tests/ || die