1 |
mgorny 12/12/01 09:27:17 |
2 |
|
3 |
Modified: dev-guide.xml |
4 |
Log: |
5 |
Further clean up, describe python-any-r1. |
6 |
|
7 |
Revision Changes Path |
8 |
1.8 xml/htdocs/proj/en/Python/python-r1/dev-guide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/Python/python-r1/dev-guide.xml?rev=1.8&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/Python/python-r1/dev-guide.xml?rev=1.8&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/Python/python-r1/dev-guide.xml?r1=1.7&r2=1.8 |
13 |
|
14 |
Index: dev-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/python-r1/dev-guide.xml,v |
17 |
retrieving revision 1.7 |
18 |
retrieving revision 1.8 |
19 |
diff -u -r1.7 -r1.8 |
20 |
--- dev-guide.xml 30 Nov 2012 11:04:15 -0000 1.7 |
21 |
+++ dev-guide.xml 1 Dec 2012 09:27:16 -0000 1.8 |
22 |
@@ -1,7 +1,7 @@ |
23 |
<?xml version="1.0" encoding="UTF-8"?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
|
26 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/python-r1/dev-guide.xml,v 1.7 2012/11/30 11:04:15 mgorny Exp $ --> |
27 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/python-r1/dev-guide.xml,v 1.8 2012/12/01 09:27:16 mgorny Exp $ --> |
28 |
|
29 |
<guide lang="en"> |
30 |
<title>python-r1 Developer's Guide</title> |
31 |
@@ -23,8 +23,8 @@ |
32 |
<!-- See http://creativecommons.org/licenses/by-sa/3.0/ --> |
33 |
<license version="3.0"/> |
34 |
|
35 |
-<version>6</version> |
36 |
-<date>2012-11-28</date> |
37 |
+<version>7</version> |
38 |
+<date>2012-12-01</date> |
39 |
|
40 |
<chapter id="Introductory_info"> |
41 |
<title>Introductory information</title> |
42 |
@@ -114,14 +114,15 @@ |
43 |
|
44 |
<body> |
45 |
<p> |
46 |
- The python‑r1 suite consists of four eclasses: |
47 |
+ The python‑r1 suite consists of five eclasses: |
48 |
</p> |
49 |
|
50 |
<ol> |
51 |
<li><c>python-utils-r1</c>,</li> |
52 |
<li><c>python-r1</c>,</li> |
53 |
<li><c>distutils-r1</c>,</li> |
54 |
- <li><c>python-single-r1</c>.</li> |
55 |
+ <li><c>python-single-r1</c>,</li> |
56 |
+ <li><c>python-any-r1</c>.</li> |
57 |
</ol> |
58 |
|
59 |
<p> |
60 |
@@ -158,36 +159,57 @@ |
61 |
</p> |
62 |
|
63 |
<p> |
64 |
+ The <c>python‑any‑r1</c> eclass is designed to be used |
65 |
+ on packages which do not need explicit implementation choice |
66 |
+ or rely on specific implementation installed being invariable. |
67 |
+ This mostly involves packages having strictly build-time |
68 |
+ dependency on Python. It exports metadata suitable for setting |
69 |
+ an appropriate dependency, and a <c>pkg_setup</c> phase function |
70 |
+ handling finding the best installed implementation. |
71 |
+ </p> |
72 |
+ |
73 |
+ <p> |
74 |
The choice of eclass for your package could follow the following |
75 |
algorithm: |
76 |
</p> |
77 |
|
78 |
<ol> |
79 |
<li> |
80 |
- if the package supports being installed for multiple Python |
81 |
- implementations, the Python part of it is unconditional |
82 |
- and uses the distutils build system (or one very similar), |
83 |
- use the <c>distutils‑r1</c> eclass; |
84 |
+ If the package supports being installed for multiple Python |
85 |
+ implementations; |
86 |
+ |
87 |
+ <ol> |
88 |
+ <li> |
89 |
+ and if the Python-related content uses the distutils build |
90 |
+ system and is free of being conditional to a USE flag, |
91 |
+ then use <c>distutils‑r1</c>; |
92 |
+ </li> |
93 |
+ |
94 |
+ <li> |
95 |
+ and if the Python-related content is conditional |
96 |
+ to a USE flag or the package uses non-distutils build |
97 |
+ system, then use <c>python‑r1</c>. |
98 |
+ </li> |
99 |
+ </ol> |
100 |
</li> |
101 |
|
102 |
<li> |
103 |
- if the package supports being installed for multiple Python |
104 |
- implementations separately and installs Python modules, |
105 |
- scripts or embeds Python, use <c>python‑r1</c>; |
106 |
+ If the package can be installed for a single Python |
107 |
+ implementation only and installs Python modules, scripts |
108 |
+ or embeds Python, then use <c>python‑single‑r1</c>. |
109 |
</li> |
110 |
|
111 |
<li> |
112 |
- if the package can be installed for a single Python |
113 |
- implementation only and installs Python modules, scripts |
114 |
- or embeds Python, use <c>python‑single‑r1</c>; |
115 |
+ If the package has a strictly build-time dependency on Python |
116 |
+ or installs Python modules or scripts in a common variant |
117 |
+ for multiple Python implementations, |
118 |
+ then use <c>python‑any‑r1</c>. |
119 |
</li> |
120 |
|
121 |
<li> |
122 |
- if the package has a specific or loose connection to Python, |
123 |
- installs Python modules for multiple implementations |
124 |
- in a common location, or has any other special needs, |
125 |
- consider using <c>python‑utils‑r1</c> (although you may |
126 |
- not need any eclass at all). |
127 |
+ If the package has a specific or loose connection to Python |
128 |
+ where no other eclass serves the intended purpose, |
129 |
+ then consider using <c>python‑utils‑r1</c>. |
130 |
</li> |
131 |
</ol> |
132 |
|
133 |
@@ -440,7 +462,7 @@ |
134 |
</tr> |
135 |
|
136 |
<tr> |
137 |
- <ti><c>python‑r1</c> & <c>distutils‑r1</c></ti> |
138 |
+ <ti><c>python‑r1</c></ti> |
139 |
<ti> |
140 |
USE-conditional upon <c>PYTHON_TARGETS</c> |
141 |
</ti> |
142 |
@@ -464,6 +486,18 @@ |
143 |
</c> |
144 |
</ti> |
145 |
</tr> |
146 |
+ |
147 |
+ <tr> |
148 |
+ <ti><c>python‑any‑r1</c></ti> |
149 |
+ <ti> |
150 |
+ unconditional, satisfied by any supported version |
151 |
+ </ti> |
152 |
+ <ti> |
153 |
+ <c> |
154 |
+ || ( dev-lang/python:2.7 dev-lang/python:2.6 ) |
155 |
+ </c> |
156 |
+ </ti> |
157 |
+ </tr> |
158 |
</table> |
159 |
</body> |
160 |
</section> |
161 |
@@ -518,20 +552,20 @@ |
162 |
</pre> |
163 |
|
164 |
<p> |
165 |
- The compatibility of <c>PYTHON_USEDEP</c> with ebuilds using |
166 |
- different eclasses according to the inherited eclass is listed |
167 |
- in the following table: |
168 |
+ The compatibilities of <c>PYTHON_USEDEP</c> with packages |
169 |
+ using different eclasses according to the inherited eclass |
170 |
+ of the ebuild being developed are listed in the following table: |
171 |
</p> |
172 |
|
173 |
<table> |
174 |
<tr> |
175 |
<th>Eclass</th> |
176 |
- <th>Compatible with</th> |
177 |
+ <th>Compatible with packages using</th> |
178 |
<th>Example value</th> |
179 |
</tr> |
180 |
|
181 |
<tr> |
182 |
- <ti><c>python‑r1</c> & <c>distutils‑r1</c></ti> |
183 |
+ <ti><c>python‑r1</c></ti> |
184 |
<ti> |
185 |
<c>python‑r1</c>, <c>python‑distutils‑ng</c> |
186 |
</ti> |
187 |
@@ -544,13 +578,23 @@ |
188 |
<ti><c>python‑single‑r1</c></ti> |
189 |
<ti> |
190 |
<c>python‑r1</c>, |
191 |
- <c>python‑single‑r1</c>, |
192 |
- <c>python‑distutils‑ng</c> |
193 |
+ <c>python‑distutils‑ng</c>, |
194 |
+ <c>python‑single‑r1</c> |
195 |
</ti> |
196 |
<ti> |
197 |
<c>python_targets_python2_6?,python_targets_python2_7?,python_single_target_python2_6(+)?,python_single_target_python2_7(+)?</c> |
198 |
</ti> |
199 |
</tr> |
200 |
+ |
201 |
+ <tr> |
202 |
+ <ti><c>python‑any‑r1</c></ti> |
203 |
+ <ti> |
204 |
+ not used in eclass |
205 |
+ </ti> |
206 |
+ <ti> |
207 |
+ n/a |
208 |
+ </ti> |
209 |
+ </tr> |
210 |
</table> |
211 |
</body> |
212 |
</section> |
213 |
@@ -564,7 +608,7 @@ |
214 |
belongs to the Python implementation itself but is not always |
215 |
available. The availability can depend both on Python version |
216 |
and USE flags. These features can be divided into two types; |
217 |
- those having replacement modules and those lacking them. |
218 |
+ those having replacement packages and those lacking them. |
219 |
</p> |
220 |
|
221 |
<p> |