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 1. Despite the limited interest in things pypy, for those
2 who have one, here is touch of support for it.
3 I'm not cutting && pasting a 525 line file here. I have made a pypy
4 aware python-eselect. Challenged by the perrenial Arfrever, whose
5 truncated nick currently escapes me, it even does
6 eselect python show --pypy1 --ABI correctly now
7 (== 2.7-pypy-1.8)
8 so it is at least less broken. In fact I even think it's not
9 broken. However, the essence of testing is to see it work outside my
10 cosy little archtester system.
11
12 2. The most favoured subject of all. python.eclass. Currently,
13 python.eclass is pypy unaware when it comes to PYTHON_USE_WITH.
14
15 go to python_pkg_setup and follow proceedings. So there are some
16 packages that are pypy restricted simply because they have a
17 PYTHON_USE_WITH variable set, but not all. Between the two, we have
18 USE flags doc,(trivial), examples(trivial), ncurses, sqlite, ssl && xml
19 in common. Without ever looking, I suspect the need for use flags
20 ncurses, sqlite, ssl && xml in python would be similarly warranted in
21 pypy. That leaves packages that have gdbm, ipv6, readline, threads, tk
22 and wide-unicode set in USE_PYTHON_WITH that will bail out screaming
23 ooopsie, pypy doesn't have use python_only_FLAG set -> pypy cast aside
24 again in a most unjust manner.
25 Please consider;
26
27 python_pkg_setup_check_USE_flags() {
28 local python_atom USE_flag one_atom
29 python_atom="$(python_get_implementational_package)"
30 for USE_flag in ${PYTHON_USE_WITH}; do
31 one_atom="${python_atom}[${USE_flag}]}"
32 if ! has_version "${python_atom}[${USE_flag}]" &&
33 [[ "${one_atom:11:4}" != "pypy" ]]; then eerror
34 "Please rebuild ${python_atom} with the
35 following USE flags enabled:
36 ${PYTHON_USE_WITH}" die "Please rebuild
37 ${python_atom} with the following USE flags
38 enabled: ${PYTHON_USE_WITH}"
39 fi
40
41 Well this 3 line change brings pypy back in the fold at least, basically
42 excluding pypy from and check_of_USE_flags. This makes for a start,
43 but is not the panacea. It begs the questions;
44 How to re-author in consideration of pypy with the use flags set it has
45 in common?
46 How to re-author in consideration of whether pypy needs them set at all?
47 How to re-author in consideration of pypy needing no use flags set and
48 is perfectly fine?
49 How to re-author it before the perrenial ...... oh never mind.
50
51 pypy needs some more 'support' to rise above being the curiosity that
52 it is.
53
54 -- eselect python show --pypy1 --ABI
55 kind regards
56
57 Ian Delaney