Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in xml/htdocs/proj/en/Python/python-r1: policy-guide.xml
Date: Wed, 26 Dec 2012 14:59:21
Message-Id: 20121226145911.455542171C@flycatcher.gentoo.org
1 mgorny 12/12/26 14:59:11
2
3 Modified: policy-guide.xml
4 Log:
5 Add a section on virtuals.
6
7 Revision Changes Path
8 1.3 xml/htdocs/proj/en/Python/python-r1/policy-guide.xml
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/Python/python-r1/policy-guide.xml?rev=1.3&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/Python/python-r1/policy-guide.xml?rev=1.3&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/Python/python-r1/policy-guide.xml?r1=1.2&r2=1.3
13
14 Index: policy-guide.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/python-r1/policy-guide.xml,v
17 retrieving revision 1.2
18 retrieving revision 1.3
19 diff -u -r1.2 -r1.3
20 --- policy-guide.xml 21 Dec 2012 21:35:38 -0000 1.2
21 +++ policy-guide.xml 26 Dec 2012 14:59:11 -0000 1.3
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/policy-guide.xml,v 1.2 2012/12/21 21:35:38 mgorny Exp $ -->
27 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/python-r1/policy-guide.xml,v 1.3 2012/12/26 14:59:11 mgorny Exp $ -->
28
29 <guide lang="en">
30 <title>python-r1 Policy 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>2</version>
36 -<date>2012-12-21</date>
37 +<version>3</version>
38 +<date>2012-12-26</date>
39
40 <chapter id="Common_policies">
41 <title>Common policies</title>
42 @@ -42,7 +42,7 @@
43 <li>
44 Current stable implementations — the implementations which
45 are enabled by the default value of <c>PYTHON_TARGETS</c>. All
46 - Python packages are supposed to support at least one of them.
47 + Python packages are supposed to support at least one.
48 </li>
49
50 <li>
51 @@ -54,10 +54,10 @@
52
53 <li>
54 Unsupported implementations — the implementations which
55 - are still in the tree but maintaining them consumes too much
56 - resources. Developers are not expected to patch packages
57 - to support them, and can drop them from <c>PYTHON_COMPAT</c>
58 - at will.
59 + are still in the tree but their maintenance is undesirably
60 + resource consuming. Developers are not expected to support
61 + those packages by patching, and can drop them
62 + from <c>PYTHON_COMPAT</c> at will.
63 </li>
64
65 <li>
66 @@ -95,7 +95,7 @@
67 <body>
68 <p>
69 The <c>PYTHON_COMPAT</c> variable should be treated
70 - with respect similar to what is required for <c>KEYWORDS</c>.
71 + with respect similar to that given for <c>KEYWORDS</c>.
72 No implementation should ever be listed without prior testing.
73 </p>
74
75 @@ -110,7 +110,7 @@
76 </p>
77
78 <p>
79 - The list of enabled implementation in stable packages must
80 + The list of enabled implementations in stable packages must
81 not be changed. Therefore, if a package is stable, it should
82 be revision-bumped, the new implementation added to the new,
83 non-stable ebuild.
84 @@ -133,6 +133,57 @@
85 </p>
86 </body>
87 </section>
88 +
89 + <section id="cp_Use_of_virtual_packages">
90 + <title>Use of virtual packages</title>
91 +
92 + <body>
93 + <p>
94 + The virtual packages are used mostly to provide a consistent way
95 + of depending on Python packages. They serve as a replacement
96 + for dependencies which would normally need to be made conditional
97 + upon a particular set of Python implementations.
98 + </p>
99 +
100 + <pre caption='Example benefit of virtual packages'>
101 +<comment># Non-virtual solution</comment>
102 +<var>RDEPEND</var>="
103 + <ident>python_targets_python2_5?</ident> ( <const>dev-python/argparse[python_targets_python2_5]</const> )
104 + <ident>python_targets_python2_6?</ident> ( <const>dev-python/argparse[python_targets_python2_6]</const> )
105 + <ident>python_targets_jython2_5?</ident> ( <const>dev-python/argparse[python_targets_jython2_5]</const> )"
106 +
107 +<comment># Virtual solution</comment>
108 +<var>RDEPEND</var>="<const>virtual/python-argparse[${PYTHON_USEDEP}]</const>"</pre>
109 +
110 + <p>
111 + The Python ebuilds should use virtuals whenever they need
112 + to express a dependency which varies through enabled Python
113 + implementations. The following table lists all virtual packages
114 + available to date and cases when they can be replaced
115 + with direct dependencies:
116 + </p>
117 +
118 + <table>
119 + <tr>
120 + <th>Virtual</th>
121 + <th>Description</th>
122 + <th>Alternatives</th>
123 + </tr>
124 +
125 + <tr>
126 + <ti><c>virtual/python-argparse</c></ti>
127 + <ti>
128 + Provides the <c>argparse</c> module (built-in since
129 + python2.7).
130 + </ti>
131 + <ti>
132 + Packages which do not support Python 2.5 nor 2.6 do not need
133 + to depend on <c>argparse</c> at all (it is built-in).
134 + </ti>
135 + </tr>
136 + </table>
137 + </body>
138 + </section>
139 </chapter>
140
141 <!-- vim:se tw=72 ts=2 sts=2 sw=2 :-->