1 |
On 6 October 2012 04:05, Michał Górny <mgorny@g.o> wrote: |
2 |
> Hello, |
3 |
> |
4 |
> As you may know, distutils-r1 (much like python.eclass & p-d-ng) |
5 |
> holds separate ('converted') copies of Python scripts for each |
6 |
> implementation. And much like python.eclass, it will use a wrapper |
7 |
> program to choose the 'default' script version respecting |
8 |
> eselect-python. |
9 |
> |
10 |
> So, if dev-python/foo installs /usr/bin/foo, the following will be |
11 |
> installed: |
12 |
> |
13 |
> - /usr/bin/foo-pypy1_8 |
14 |
> - /usr/bin/foo-python2_6 |
15 |
> - /usr/bin/foo-python2_7 |
16 |
> - /usr/bin/foo-jython2_5 |
17 |
> ^^^^^^^^^ |
18 |
> - /usr/bin/foo -> py-exec |
19 |
> |
20 |
> I have allowed myself to highlight the implementation suffixes in |
21 |
> scripts. These are suffixes used by p-d-ng, and they are the same as |
22 |
> implementation names used in PYTHON_TARGETS. |
23 |
> |
24 |
> python.eclass used instead: |
25 |
> - /usr/bin/foo-2.7-pypy-1.8 (yes, seriously) |
26 |
> - /usr/bin/foo-2.6 |
27 |
> - /usr/bin/foo-2.7 |
28 |
> - /usr/bin/foo-2.5-jython |
29 |
> |
30 |
> which are completely custom. Now, Gentoo's EPYTHON variable instead |
31 |
> contains Python executable names which are (for those suffixes): |
32 |
> - pypy-c1.8 |
33 |
> - python2.6 |
34 |
> - python2.7 |
35 |
> - jython2.5 |
36 |
> |
37 |
> Now, I'm wondering what to do in order for the wrapper (py-exec) |
38 |
> to be optimal and compliant with Gentoo's EPYTHON (and thus |
39 |
> eselect-python). |
40 |
> |
41 |
> |
42 |
> 1/ Use current python-distutils-ng names. |
43 |
> |
44 |
> Adv: |
45 |
> - same values as in PYTHON_TARGETS, |
46 |
> - converting the ~25 ebuilds wouldn't change names. |
47 |
> Disadv: |
48 |
> - starting every python app through 'foo' would require converting |
49 |
> the EPYTHON value to PYTHON_TARGETS, |
50 |
> - python wrapper would have to have conversion tables hardcoded (and I |
51 |
> really dislike doing this). |
52 |
> |
53 |
> |
54 |
> 2/ Change suffixes to match $EPYTHON. |
55 |
> |
56 |
> Adv: |
57 |
> - makes the wrapper really simple, |
58 |
> - more 'compliance' with python.eclass. |
59 |
> Disadv: |
60 |
> - the EPYTHON name for pypy is 'pypy-c', so it'd be 'foo-pypy-c1.8'. |
61 |
> |
62 |
> |
63 |
> Any other ideas? Thoughts? |
64 |
> |
65 |
> You can take a look at current wrapper code (it's called |
66 |
> python-wrapper-r1, I will rename it later)[1] but note that's |
67 |
> a partial solution and the actual one will be either more complex |
68 |
> (if 1/) or simpler (if 2/). |
69 |
> |
70 |
> [1]:https://bitbucket.org/mgorny/python-wrapper-r1/src/master/src/python-wrapper.c |
71 |
> |
72 |
> -- |
73 |
> Best regards, |
74 |
> Michał Górny |
75 |
|
76 |
I vote for simple = 2. |
77 |
|
78 |
-- |
79 |
Cheers, |
80 |
|
81 |
Ben | yngwin |
82 |
Gentoo developer |
83 |
Gentoo Qt project lead, Gentoo Wiki admin |