src_test() would fail when Python 3 is set as main active version of Python. Probably the following will help: src_test() { $(PYTHON -2) pypy/test_all.py --pypy=pypy-c lib-python }
I have fixed this as suggested.