Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | <html> | |
3 | <head> | |
4 | <link rel="STYLESHEET" href="dist.css" type='text/css' /> | |
5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> | |
6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> | |
7 | <link rel="first" href="dist.html" title='Distributing Python Modules' /> | |
8 | <link rel='index' href='genindex.html' title='Index' /> | |
9 | <link rel='last' href='about.html' title='About this document...' /> | |
10 | <link rel='help' href='about.html' title='About this document...' /> | |
11 | <link rel="next" href="node14.html" /> | |
12 | <link rel="prev" href="node12.html" /> | |
13 | <link rel="parent" href="setup-script.html" /> | |
14 | <link rel="next" href="node14.html" /> | |
15 | <meta name='aesop' content='information' /> | |
16 | <title>2.7 Additional meta-data</title> | |
17 | </head> | |
18 | <body> | |
19 | <DIV CLASS="navigation"> | |
20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> | |
21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
22 | <tr> | |
23 | <td class='online-navigation'><a rel="prev" title="2.6 Installing Additional Files" | |
24 | href="node12.html"><img src='../icons/previous.png' | |
25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
26 | <td class='online-navigation'><a rel="parent" title="2. Writing the Setup" | |
27 | href="setup-script.html"><img src='../icons/up.png' | |
28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
29 | <td class='online-navigation'><a rel="next" title="2.8 Debugging the setup" | |
30 | href="node14.html"><img src='../icons/next.png' | |
31 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
32 | <td align="center" width="100%">Distributing Python Modules</td> | |
33 | <td class='online-navigation'><img src='../icons/blank.png' | |
34 | border='0' height='32' alt='' width='32' /></td> | |
35 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
36 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
37 | <td class='online-navigation'><a rel="index" title="Index" | |
38 | href="genindex.html"><img src='../icons/index.png' | |
39 | border='0' height='32' alt='Index' width='32' /></A></td> | |
40 | </tr></table> | |
41 | <div class='online-navigation'> | |
42 | <b class="navlabel">Previous:</b> | |
43 | <a class="sectref" rel="prev" href="node12.html">2.6 Installing Additional Files</A> | |
44 | <b class="navlabel">Up:</b> | |
45 | <a class="sectref" rel="parent" href="setup-script.html">2. Writing the Setup</A> | |
46 | <b class="navlabel">Next:</b> | |
47 | <a class="sectref" rel="next" href="node14.html">2.8 Debugging the setup</A> | |
48 | </div> | |
49 | <hr /></div> | |
50 | </DIV> | |
51 | <!--End of Navigation Panel--> | |
52 | ||
53 | <H1><A NAME="SECTION002700000000000000000"></A> | |
54 | <A NAME="meta-data"></A> | |
55 | <BR> | |
56 | 2.7 Additional meta-data | |
57 | </H1> | |
58 | ||
59 | <P> | |
60 | The setup script may include additional meta-data beyond the name and | |
61 | version. This information includes: | |
62 | ||
63 | <P> | |
64 | <div class="center"><table class="realtable"> | |
65 | <thead> | |
66 | <tr> | |
67 | <th class="left" >Meta-Data</th> | |
68 | <th class="left" >Description</th> | |
69 | <th class="left" >Value</th> | |
70 | <th class="center">Notes</th> | |
71 | </tr> | |
72 | </thead> | |
73 | <tbody> | |
74 | <tr><td class="left" valign="baseline"><code>name</code></td> | |
75 | <td class="left" >name of the package</td> | |
76 | <td class="left" >short string</td> | |
77 | <td class="center">(1)</td></tr> | |
78 | <tr><td class="left" valign="baseline"><code>version</code></td> | |
79 | <td class="left" >version of this release</td> | |
80 | <td class="left" >short string</td> | |
81 | <td class="center">(1)(2)</td></tr> | |
82 | <tr><td class="left" valign="baseline"><code>author</code></td> | |
83 | <td class="left" >package author's name</td> | |
84 | <td class="left" >short string</td> | |
85 | <td class="center">(3)</td></tr> | |
86 | <tr><td class="left" valign="baseline"><code>author_email</code></td> | |
87 | <td class="left" >email address of the package author</td> | |
88 | <td class="left" >email address</td> | |
89 | <td class="center">(3)</td></tr> | |
90 | <tr><td class="left" valign="baseline"><code>maintainer</code></td> | |
91 | <td class="left" >package maintainer's name</td> | |
92 | <td class="left" >short string</td> | |
93 | <td class="center">(3)</td></tr> | |
94 | <tr><td class="left" valign="baseline"><code>maintainer_email</code></td> | |
95 | <td class="left" >email address of the package maintainer</td> | |
96 | <td class="left" >email address</td> | |
97 | <td class="center">(3)</td></tr> | |
98 | <tr><td class="left" valign="baseline"><code>url</code></td> | |
99 | <td class="left" >home page for the package</td> | |
100 | <td class="left" >URL</td> | |
101 | <td class="center">(1)</td></tr> | |
102 | <tr><td class="left" valign="baseline"><code>description</code></td> | |
103 | <td class="left" >short, summary description of the package</td> | |
104 | <td class="left" >short string</td> | |
105 | <td class="center"></td></tr> | |
106 | <tr><td class="left" valign="baseline"><code>long_description</code></td> | |
107 | <td class="left" >longer description of the package</td> | |
108 | <td class="left" >long string</td> | |
109 | <td class="center"></td></tr> | |
110 | <tr><td class="left" valign="baseline"><code>download_url</code></td> | |
111 | <td class="left" >location where the package may be downloaded</td> | |
112 | <td class="left" >URL</td> | |
113 | <td class="center">(4)</td></tr> | |
114 | <tr><td class="left" valign="baseline"><code>classifiers</code></td> | |
115 | <td class="left" >a list of Trove classifiers</td> | |
116 | <td class="left" >list of strings</td> | |
117 | <td class="center">(4)</td></tr></tbody> | |
118 | </table></div> | |
119 | ||
120 | <P> | |
121 | Notes: | |
122 | <DL> | |
123 | <DT><STRONG>(1)</STRONG></DT> | |
124 | <DD>These fields are required. | |
125 | </DD> | |
126 | <DT><STRONG>(2)</STRONG></DT> | |
127 | <DD>It is recommended that versions take the form | |
128 | <em>major.minor<big>[</big>.patch<big>[</big>.sub<big>]</big><big>]</big></em>. | |
129 | </DD> | |
130 | <DT><STRONG>(3)</STRONG></DT> | |
131 | <DD>Either the author or the maintainer must be identified. | |
132 | </DD> | |
133 | <DT><STRONG>(4)</STRONG></DT> | |
134 | <DD>These fields should not be used if your package is to be | |
135 | compatible with Python versions prior to 2.2.3 or 2.3. The list is | |
136 | available from the <a class="ulink" href="http://www.python.org/pypi" | |
137 | >PyPI website</a>. | |
138 | ||
139 | <P> | |
140 | </DD> | |
141 | <DT><STRONG>'short string'</STRONG></DT> | |
142 | <DD>A single line of text, not more than 200 characters. | |
143 | </DD> | |
144 | <DT><STRONG>'long string'</STRONG></DT> | |
145 | <DD>Multiple lines of plain text in reStructuredText | |
146 | format (see <a class="url" href="http://docutils.sf.net/">http://docutils.sf.net/</a>). | |
147 | </DD> | |
148 | <DT><STRONG>'list of strings'</STRONG></DT> | |
149 | <DD>See below. | |
150 | </DD> | |
151 | </DL> | |
152 | ||
153 | <P> | |
154 | None of the string values may be Unicode. | |
155 | ||
156 | <P> | |
157 | Encoding the version information is an art in itself. Python packages | |
158 | generally adhere to the version format | |
159 | <em>major.minor<big>[</big>.patch<big>]</big><big>[</big>sub<big>]</big></em>. The major number is | |
160 | 0 for | |
161 | initial, experimental releases of software. It is incremented for | |
162 | releases that represent major milestones in a package. The minor | |
163 | number is incremented when important new features are added to the | |
164 | package. The patch number increments when bug-fix releases are | |
165 | made. Additional trailing version information is sometimes used to | |
166 | indicate sub-releases. These are "a1,a2,...,aN" (for alpha releases, | |
167 | where functionality and API may change), "b1,b2,...,bN" (for beta | |
168 | releases, which only fix bugs) and "pr1,pr2,...,prN" (for final | |
169 | pre-release release testing). Some examples: | |
170 | ||
171 | <P> | |
172 | <DL> | |
173 | <DT><STRONG>0.1.0</STRONG></DT> | |
174 | <DD>the first, experimental release of a package | |
175 | </DD> | |
176 | <DT><STRONG>1.0.1a2</STRONG></DT> | |
177 | <DD>the second alpha release of the first patch version of 1.0 | |
178 | </DD> | |
179 | </DL> | |
180 | ||
181 | <P> | |
182 | <span class="du-option">classifiers</span> are specified in a python list: | |
183 | ||
184 | <P> | |
185 | <div class="verbatim"><pre> | |
186 | setup(... | |
187 | classifiers=[ | |
188 | 'Development Status :: 4 - Beta', | |
189 | 'Environment :: Console', | |
190 | 'Environment :: Web Environment', | |
191 | 'Intended Audience :: End Users/Desktop', | |
192 | 'Intended Audience :: Developers', | |
193 | 'Intended Audience :: System Administrators', | |
194 | 'License :: OSI Approved :: Python Software Foundation License', | |
195 | 'Operating System :: MacOS :: MacOS X', | |
196 | 'Operating System :: Microsoft :: Windows', | |
197 | 'Operating System :: POSIX', | |
198 | 'Programming Language :: Python', | |
199 | 'Topic :: Communications :: Email', | |
200 | 'Topic :: Office/Business', | |
201 | 'Topic :: Software Development :: Bug Tracking', | |
202 | ], | |
203 | ) | |
204 | </pre></div> | |
205 | ||
206 | <P> | |
207 | If you wish to include classifiers in your <span class="file">setup.py</span> file and also | |
208 | wish to remain backwards-compatible with Python releases prior to 2.2.3, | |
209 | then you can include the following code fragment in your <span class="file">setup.py</span> | |
210 | before the <tt class="function">setup()</tt> call. | |
211 | ||
212 | <P> | |
213 | <div class="verbatim"><pre> | |
214 | # patch distutils if it can't cope with the "classifiers" or | |
215 | # "download_url" keywords | |
216 | if sys.version < '2.2.3': | |
217 | from distutils.dist import DistributionMetadata | |
218 | DistributionMetadata.classifiers = None | |
219 | DistributionMetadata.download_url = None | |
220 | </pre></div> | |
221 | ||
222 | <P> | |
223 | ||
224 | <DIV CLASS="navigation"> | |
225 | <div class='online-navigation'> | |
226 | <p></p><hr /> | |
227 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
228 | <tr> | |
229 | <td class='online-navigation'><a rel="prev" title="2.6 Installing Additional Files" | |
230 | href="node12.html"><img src='../icons/previous.png' | |
231 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
232 | <td class='online-navigation'><a rel="parent" title="2. Writing the Setup" | |
233 | href="setup-script.html"><img src='../icons/up.png' | |
234 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
235 | <td class='online-navigation'><a rel="next" title="2.8 Debugging the setup" | |
236 | href="node14.html"><img src='../icons/next.png' | |
237 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
238 | <td align="center" width="100%">Distributing Python Modules</td> | |
239 | <td class='online-navigation'><img src='../icons/blank.png' | |
240 | border='0' height='32' alt='' width='32' /></td> | |
241 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
242 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
243 | <td class='online-navigation'><a rel="index" title="Index" | |
244 | href="genindex.html"><img src='../icons/index.png' | |
245 | border='0' height='32' alt='Index' width='32' /></A></td> | |
246 | </tr></table> | |
247 | <div class='online-navigation'> | |
248 | <b class="navlabel">Previous:</b> | |
249 | <a class="sectref" rel="prev" href="node12.html">2.6 Installing Additional Files</A> | |
250 | <b class="navlabel">Up:</b> | |
251 | <a class="sectref" rel="parent" href="setup-script.html">2. Writing the Setup</A> | |
252 | <b class="navlabel">Next:</b> | |
253 | <a class="sectref" rel="next" href="node14.html">2.8 Debugging the setup</A> | |
254 | </div> | |
255 | </div> | |
256 | <hr /> | |
257 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> | |
258 | </DIV> | |
259 | <!--End of Navigation Panel--> | |
260 | <ADDRESS> | |
261 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. | |
262 | </ADDRESS> | |
263 | </BODY> | |
264 | </HTML> |