1 |
Hello, |
2 |
|
3 |
As I was asked to reveal the details of what is my plan for python-r1, |
4 |
I'd like to submit this short RFC explaining the ideas in more detail. |
5 |
I'm a bit short on time currently, therefore I will focus only |
6 |
on drafting the overall steps which I would like to do in the near |
7 |
future. |
8 |
|
9 |
I'd like to note that there are a few forks in the road of python-r1, |
10 |
and I'm quite open to choosing either path satisfying our developer |
11 |
and user needs better. |
12 |
|
13 |
|
14 |
General topics: |
15 |
|
16 |
1. Developing and improving documentation for python-r1; |
17 |
2. Testing basic python-r1 ideas and gaining feedback; |
18 |
3. Solving the dependency-compatibility problem with python.eclass; |
19 |
4. Adding missing features to python-r1; |
20 |
5. Migrating packages in the tree. |
21 |
|
22 |
|
23 |
Developing and improving documentation for python-r1 |
24 |
---------------------------------------------------- |
25 |
|
26 |
This is the task I'm putting most effort into recently. The idea is to |
27 |
provide a good handbook both for users and for developers. So far, all |
28 |
the basics should be covered already. I have a patch ready to explain |
29 |
USE_PYTHON as well but I'm delaying the commit until we decide on how |
30 |
to proceed with python.eclass. |
31 |
|
32 |
http://www.gentoo.org/proj/en/Python/python-r1/user-guide.xml |
33 |
http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml |
34 |
|
35 |
|
36 |
Testing basic python-r1 ideas and gaining feedback |
37 |
-------------------------------------------------- |
38 |
|
39 |
The most important point to me right now is gaining more feedback |
40 |
on the design. So far, most of the feedback was quite positive which |
41 |
makes me believe the eclasses should be ready soon to be deployed for |
42 |
a broader use. |
43 |
|
44 |
|
45 |
Solving the dependency-compatibility problem with python.eclass |
46 |
--------------------------------------------------------------- |
47 |
|
48 |
This is the problem which blocked the development for now. We have to |
49 |
decide how to proceed with python.eclass packages depending |
50 |
on python-r1 packages, and the other way around. |
51 |
|
52 |
There are two ways of solving this: either providing users |
53 |
with the necessary information and relying on them not to break their |
54 |
systems, or modifying python.eclass behavior. |
55 |
|
56 |
|
57 |
There were considerations that PYTHON_TARGETS variable should be |
58 |
dropped in favor of modifying the syntax of USE_PYTHON to match |
59 |
the needs of USE flags. Despite the opinion of my counterpart, I do not |
60 |
see a benefit here since: |
61 |
|
62 |
a) PYTHON_TARGETS were announced, documented and deployed already. |
63 |
A fair number of users set it. Requesting them to rollback the changes |
64 |
would be at least unfortunate; |
65 |
|
66 |
b) changing syntax of USE_PYTHON in any way will require users to |
67 |
modify their make.conf files anyway. There is no sane way of avoiding |
68 |
this. The solution based on a new variable is safer and cleaner. |
69 |
|
70 |
|
71 |
Anyway, the simple solution is to preserve the current python.eclass |
72 |
behavior and put the necessary docs in-place. Most importantly, |
73 |
the python-r1 User's Guide would document how to proceed with various |
74 |
values of PYTHON_TARGETS. At some point (when python.eclass |
75 |
is deprecated), the additional documentation sections would just |
76 |
be dropped. |
77 |
|
78 |
Advantages: |
79 |
+ less work for us, |
80 |
+ works fine on default installations (just necessary to eselect |
81 |
the correct py2/py3 version), |
82 |
+ can be done sanely. |
83 |
|
84 |
Disadvantage: |
85 |
- requires attention from users. |
86 |
|
87 |
The solution could be partially improved through adding some warnings |
88 |
in-place. The python-r1 eclass could warn when USE_PYTHON misses |
89 |
a requested implementation; the other way would be harder to achieve |
90 |
since portage filters USE_EXPAND variables. |
91 |
|
92 |
|
93 |
Alternative: modifying python.eclass to respect PYTHON_TARGETS. Since |
94 |
USE_EXPAND variables are filtered by portage (and in EAPI 5), we can't |
95 |
really do this without adding PYTHON_TARGETS to packages' IUSE. |
96 |
|
97 |
So, the step is effectively: make python.eclass export and respect |
98 |
PYTHON_TARGETS. Deprecate USE_PYTHON; get rid of PYTHON_ABIS. |
99 |
|
100 |
Advantages: |
101 |
+ just works™, |
102 |
+ we could probably get rid of python-updater, |
103 |
+ we could remove python3 from defaults (the current python.eclass |
104 |
behavior is the only reason we keep it there). |
105 |
|
106 |
Disadvantages: |
107 |
- needs modifying python.eclass behavior, |
108 |
- will affect stable packages directly, |
109 |
- all users will be forced to rebuild all Python packages, |
110 |
- PYTHON_ABIS will not be respected, so users will be limited |
111 |
to implementations listed in profiles), |
112 |
- potential of unforeseen issues. |
113 |
|
114 |
|
115 |
I'm fine with either way. However, if the latter is chosen, we'd need |
116 |
someone who can at least double-check changes to python.eclass and do |
117 |
a serious bit of testing. |
118 |
|
119 |
|
120 |
Adding missing features to python-r1 |
121 |
------------------------------------ |
122 |
|
123 |
This is probably the point most of you are interested in. The python-r1 |
124 |
is intended to become a complete replacement for python.eclass, |
125 |
and thus I'm intending to finally add all features necessary. |
126 |
|
127 |
The most important points I see here is: |
128 |
|
129 |
|
130 |
1) splitting common functions into python-utils-r1. |
131 |
|
132 |
The python-utils-r1 eclass would provide means to work with specific |
133 |
Python packages like portage. Unlike python-r1, it would not export |
134 |
IUSE or require any specific USE flags. |
135 |
|
136 |
I'm not insisting on this nor giving it a very high priority. It is |
137 |
a straightforward change since python-r1 will inherit the new eclass |
138 |
anyway. |
139 |
|
140 |
|
141 |
2) support for packages not supporting multiple Python implementations. |
142 |
|
143 |
So far, I haven't got much of a feedback in this area. I will probably |
144 |
proceed with REQUIRED_USE="^^ ( ... )". If we decide to go the 'hard' |
145 |
way of modifying python.eclass and drop Python 3 from default |
146 |
PYTHON_TARGETS, this will be painless to most of our users. However, it |
147 |
will require some of them to explicitly request an appropriate Python |
148 |
version from the package. |
149 |
|
150 |
Optionally, I'm considering adding a wrapper eclass for that. |
151 |
The eclass would just add the REQUIRED_USE and export pkg_setup() |
152 |
setting up the requested Python implementation (like python.eclass |
153 |
does). |
154 |
|
155 |
|
156 |
3) adding major and minor features. |
157 |
|
158 |
This one's a bit general since those features can be added without |
159 |
changing the eclass API in general. |
160 |
|
161 |
a) functions to install and compile Python modules, |
162 |
b) function to install Python scripts, |
163 |
c) support for includedir (or cflags?) and other desired info |
164 |
in python_export and getters. |
165 |
|
166 |
If any other features are requested, I will gladly add them. |
167 |
|
168 |
|
169 |
Migrating packages in the tree |
170 |
------------------------------ |
171 |
|
172 |
I believe that so far python-r1 has received enough attention to be |
173 |
considered a good replacement for python.eclass. I'd prefer a smooth |
174 |
transition over a rough replacement, therefore I believe the correct |
175 |
way of proceeding now is migrating packages in version or revision |
176 |
bumps for now. |
177 |
|
178 |
Firstly, the dependency issue needs to be addressed. Afterwards, |
179 |
the developers can start migrating their packages on their own will |
180 |
and preference. When a significant amount of packages is migrated, |
181 |
the process of deprecating python.eclass should start. |
182 |
|
183 |
I'm not sure if we should ever completely drop python.eclass. We should |
184 |
however be able to reach the stage when the tree has no longer any |
185 |
packages dependent upon python.eclass. |
186 |
|
187 |
|
188 |
Do you have any other questions? I'd appreciate also opinions |
189 |
on the optional parts, and the decisions which need to be made. |
190 |
|
191 |
-- |
192 |
Best regards, |
193 |
Michał Górny |