1 |
On Sat, Nov 3, 2012 at 7:47 AM, Brian Harring <ferringb@×××××.com> wrote: |
2 |
|
3 |
Some quick notes on these last points. Don't get too hung up on this; |
4 |
my general opinion of the solution follows at the end. |
5 |
|
6 |
> Your implementation mandates the following: |
7 |
> |
8 |
> *) scripts be changed from sphinx-build-2.7 to sphinx-build-python2.7. |
9 |
> |
10 |
|
11 |
The was a design decision to simplify the implementation in |
12 |
conjunction with the new eclass and avoids having to map a plain |
13 |
number (2.7) to an actual interpreter name (python2.7). I still like |
14 |
this idea, but it really isn't safe to do this in the old eclass. |
15 |
|
16 |
> *) mandates symlinks of python-EPYTHON were it to be attempted to be |
17 |
> used for python-wrapper. |
18 |
> |
19 |
|
20 |
python-exec was not originally intended to replace python-wrapper so |
21 |
there is no code in place to handle this more gracefully. |
22 |
|
23 |
> *) removes the ability to do $PYTHON_INTERP /usr/bin/script |
24 |
> |
25 |
|
26 |
Nobody dreamed up this scenario when python-exec was proposed. It |
27 |
seems pretty obvious now, but I didn't think about it until our email |
28 |
exchange about your original proposal. |
29 |
|
30 |
> These are the sort of things that would've been identified with tests. |
31 |
> |
32 |
|
33 |
I don't see how tests themselves would have identified these issues, |
34 |
since we are talking about testing use cases that had not yet been |
35 |
identified. Or that had deliberately been changed, in the case of the |
36 |
script rename. |
37 |
|
38 |
I guess you may be implying that thinking of test cases would have |
39 |
triggered some deeper thought and revealed flaws that were not |
40 |
immediately apparent. That's probably true. |
41 |
|
42 |
|
43 |
> Python herd, assuming you've not ignored the thread due to the noise, |
44 |
> your views would be useful. |
45 |
|
46 |
Just so everyone is on the same page here: python-exec was invented as |
47 |
an answer to the problem of how to implement script wrappers in the |
48 |
new eclass. The new eclass(es) were invented because nobody wanted to |
49 |
make significant modifications to the old one, given its complexity |
50 |
and code style. |
51 |
|
52 |
I don't think we were aiming for a perfect solution with python-r1 and |
53 |
python-exec, rather one that was simple so people could understand, |
54 |
and worked in the cases we considered at the time. |
55 |
|
56 |
Your main goal with python-shebang seems to be a fix to the "python2.7 |
57 |
/usr/bin/sphinx-build" thing, which is fine. But it lead you to a |
58 |
different place. |
59 |
|
60 |
|
61 |
That said, I like this python-shebang solution, and your replies to |
62 |
mgorny's questions have provided very useful insight. |
63 |
|
64 |
However, I have a few issues: |
65 |
|
66 |
1. I still don't really understand the guts of python-shebang. |
67 |
|
68 |
It's a significant chunk of C that is doing things I am not yet |
69 |
familiar with. I'm sure I can figure it out if I take some time, but |
70 |
right now I have a "fear of the unknown" thing happening in my head. |
71 |
|
72 |
I don't want us to end up with only you understanding how to modify that code. |
73 |
|
74 |
|
75 |
2. Somebody needs to write the python.eclass code if we really want to go there. |
76 |
|
77 |
I think we would need to modify |
78 |
python_merge_intermediate_installation_images, and replace |
79 |
python_generate_wrapper_scripts. If anyone wants to take a crack at |
80 |
it, great. |
81 |
|
82 |
|
83 |
3. We need to reconcile the script naming convention so we can use |
84 |
this with the new eclass as well. |
85 |
|
86 |
I just don't see us implementing PYTHON_TARGETS in python.eclass. I |
87 |
have considered it, but I just don't have the motivation to do it. I |
88 |
still think we are going to proceed with the python-r1 effort. |
89 |
|
90 |
What do you think about extending python-shebang to understand the |
91 |
script-$EPYTHON naming convention in addition to the |
92 |
script-$PYTHON_ABI convention? I only ask because I dislike the |
93 |
$PYTHON_ABI values and would rather not see that re-implemented in |
94 |
python-r1. I think script-$EPYTHON gives a clearer indication as to |
95 |
its intended purpose anyway. |