Gentoo Archives: gentoo-python

From: IAN DELANEY <della5@×××××××××.au>
To: gentoo-python@l.g.o
Subject: [gentoo-python] pypy
Date: Mon, 25 Jun 2012 13:06:24
Message-Id: 20120625205917.5f7ddce9@archtester.homenetwork
1. Despite the limited interest in things pypy, for those
who have one, here is touch of support for it.
I'm not cutting && pasting a  525 line file here.  I have made a pypy
aware python-eselect.  Challenged by the perrenial Arfrever, whose
truncated nick currently escapes me, it even does   
eselect python show --pypy1 --ABI               correctly now
(== 2.7-pypy-1.8)
so it is at least less broken.  In fact I even think it's not
broken.  However, the essence of testing is to see it work outside my
cosy little archtester system.

2. The most favoured subject of all. python.eclass.  Currently,
python.eclass is pypy unaware when it comes to PYTHON_USE_WITH.

go to python_pkg_setup and follow proceedings.  So there are some
packages that are pypy restricted simply because they have a
PYTHON_USE_WITH variable set, but not all.  Between the two, we have
USE flags doc,(trivial), examples(trivial), ncurses, sqlite, ssl && xml
in common.  Without ever looking, I suspect the need for use flags
ncurses, sqlite, ssl && xml in  python would be similarly warranted in
pypy.  That leaves packages that have gdbm, ipv6, readline, threads, tk
and wide-unicode set in USE_PYTHON_WITH that will bail out screaming
ooopsie, pypy doesn't have use python_only_FLAG set -> pypy cast aside
again in a most unjust manner.
Please consider;

python_pkg_setup_check_USE_flags() { 
	local python_atom USE_flag one_atom
	for USE_flag in ${PYTHON_USE_WITH}; do
	    if ! has_version "${python_atom}[${USE_flag}]" &&
	        [[ "${one_atom:11:4}" != "pypy" ]]; then eerror
		"Please rebuild ${python_atom} with the
		following USE flags enabled:
		${PYTHON_USE_WITH}" die "Please rebuild
		${python_atom} with the following USE flags
		enabled: ${PYTHON_USE_WITH}" 

Well this 3 line change brings pypy back in the fold at least, basically
excluding pypy from and check_of_USE_flags.  This makes for a start,
but is not the panacea.  It begs the questions;
How to re-author in consideration of pypy with the use flags set it has
in common?
How to re-author in consideration of whether pypy needs them set at all?
How to re-author in consideration of pypy needing no use flags set and
is perfectly fine? 
How to re-author it before the perrenial ...... oh never mind.

pypy needs some more 'support' to rise above being the curiosity that
it is.

-- eselect python show --pypy1 --ABI
kind regards

Ian Delaney