Lines 6-12
Link Here
|
6 |
PYTHON_DEPEND="2" |
6 |
PYTHON_DEPEND="2" |
7 |
SUPPORT_PYTHON_ABIS="1" |
7 |
SUPPORT_PYTHON_ABIS="1" |
8 |
|
8 |
|
9 |
inherit distutils |
9 |
inherit distutils eutils |
10 |
|
10 |
|
11 |
DESCRIPTION="A comprehensive HTTP client library" |
11 |
DESCRIPTION="A comprehensive HTTP client library" |
12 |
HOMEPAGE="http://code.google.com/p/httplib2/ http://pypi.python.org/pypi/httplib2" |
12 |
HOMEPAGE="http://code.google.com/p/httplib2/ http://pypi.python.org/pypi/httplib2" |
Lines 24-34
Link Here
|
24 |
#Restrict Python 3 support until upstream |
24 |
#Restrict Python 3 support until upstream |
25 |
#issue #189 is solved |
25 |
#issue #189 is solved |
26 |
|
26 |
|
|
|
27 |
src_prepare() { |
28 |
distutils_src_prepare |
29 |
# Disable failing tests, findings of Arfrever |
30 |
sed -e "s/testHeadRead/_&/" \ |
31 |
-e "s/import memcache/raise ImportError/" \ |
32 |
-i python2/httplib2test.py python3/httplib2test.py |
33 |
|
34 |
# copy and patch a testfile for pypy |
35 |
cp -f python2/httplib2test.py python2/httplib2test.py1 || die |
36 |
epatch "${FILESDIR}"/${P}-pypy_test.patch || die |
37 |
} |
38 |
|
27 |
src_test() { |
39 |
src_test() { |
28 |
testing() { |
40 |
testing() { |
29 |
pushd "python$(python_get_version --major)" > /dev/null |
41 |
local path="${S}/build-${PYTHON_ABI}/lib/" |
30 |
"$(PYTHON)" httplib2test.py |
42 |
if [[ "${PYTHON_ABI:0:1}" == '2' ]]; then |
31 |
popd > /dev/null |
43 |
if [[ "${PYTHON_ABI:4:4}" == "pypy" ]]; then |
|
|
44 |
cp python2/httplib2test.py1 $path/httplib2test.py || die |
45 |
pushd $path > /dev/null |
46 |
PYTHONPATH=. "$(PYTHON)" httplib2test.py |
47 |
else |
48 |
pushd "python$(python_get_version --major)" > /dev/null |
49 |
PYTHONPATH=$path "$(PYTHON)" httplib2test.py |
50 |
fi |
51 |
popd > /dev/null |
52 |
fi |
32 |
} |
53 |
} |
33 |
python_execute_function testing |
54 |
python_execute_function testing |
34 |
} |
55 |
} |