<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
<link rel=
"STYLESHEET" href=
"dist.css" type='text/css'
/>
<link rel=
"SHORTCUT ICON" href=
"../icons/pyfav.png" type=
"image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index'
/>
<link rel=
"first" href=
"dist.html" title='Distributing Python Modules'
/>
<link rel='index' href='genindex.html' title='Index'
/>
<link rel='last' href='about.html' title='About this document...'
/>
<link rel='help' href='about.html' title='About this document...'
/>
<link rel=
"next" href=
"node14.html" />
<link rel=
"prev" href=
"node12.html" />
<link rel=
"parent" href=
"setup-script.html" />
<link rel=
"next" href=
"node14.html" />
<meta name='aesop' content='information'
/>
<title>2.7 Additional meta-data
</title>
<div id='top-navigation-panel' xml:id='top-navigation-panel'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"2.6 Installing Additional Files"
href=
"node12.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"2. Writing the Setup"
href=
"setup-script.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"2.8 Debugging the setup"
href=
"node14.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Distributing Python Modules
</td>
<td class='online-navigation'
><img src='../icons/blank.png'
border='
0' height='
32' alt='' width='
32'
/></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"node12.html">2.6 Installing Additional Files
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"setup-script.html">2. Writing the Setup
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"node14.html">2.8 Debugging the setup
</A>
<!--End of Navigation Panel-->
<H1><A NAME=
"SECTION002700000000000000000"></A>
The setup script may include additional meta-data beyond the name and
version. This information includes:
<div class=
"center"><table class=
"realtable">
<th class=
"left" >Meta-Data
</th>
<th class=
"left" >Description
</th>
<th class=
"left" >Value
</th>
<th class=
"center">Notes
</th>
<tr><td class=
"left" valign=
"baseline"><code>name
</code></td>
<td class=
"left" >name of the package
</td>
<td class=
"left" >short string
</td>
<td class=
"center">(
1)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>version
</code></td>
<td class=
"left" >version of this release
</td>
<td class=
"left" >short string
</td>
<td class=
"center">(
1)(
2)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>author
</code></td>
<td class=
"left" >package author's name
</td>
<td class=
"left" >short string
</td>
<td class=
"center">(
3)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>author_email
</code></td>
<td class=
"left" >email address of the package author
</td>
<td class=
"left" >email address
</td>
<td class=
"center">(
3)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>maintainer
</code></td>
<td class=
"left" >package maintainer's name
</td>
<td class=
"left" >short string
</td>
<td class=
"center">(
3)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>maintainer_email
</code></td>
<td class=
"left" >email address of the package maintainer
</td>
<td class=
"left" >email address
</td>
<td class=
"center">(
3)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>url
</code></td>
<td class=
"left" >home page for the package
</td>
<td class=
"left" >URL
</td>
<td class=
"center">(
1)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>description
</code></td>
<td class=
"left" >short, summary description of the package
</td>
<td class=
"left" >short string
</td>
<td class=
"center"></td></tr>
<tr><td class=
"left" valign=
"baseline"><code>long_description
</code></td>
<td class=
"left" >longer description of the package
</td>
<td class=
"left" >long string
</td>
<td class=
"center"></td></tr>
<tr><td class=
"left" valign=
"baseline"><code>download_url
</code></td>
<td class=
"left" >location where the package may be downloaded
</td>
<td class=
"left" >URL
</td>
<td class=
"center">(
4)
</td></tr>
<tr><td class=
"left" valign=
"baseline"><code>classifiers
</code></td>
<td class=
"left" >a list of Trove classifiers
</td>
<td class=
"left" >list of strings
</td>
<td class=
"center">(
4)
</td></tr></tbody>
<DT><STRONG>(
1)
</STRONG></DT>
<DD>These fields are required.
<DT><STRONG>(
2)
</STRONG></DT>
<DD>It is recommended that versions take the form
<em>major.minor
<big>[
</big>.patch
<big>[
</big>.sub
<big>]
</big><big>]
</big></em>.
<DT><STRONG>(
3)
</STRONG></DT>
<DD>Either the author or the maintainer must be identified.
<DT><STRONG>(
4)
</STRONG></DT>
<DD>These fields should not be used if your package is to be
compatible with Python versions prior to
2.2.3 or
2.3. The list is
available from the
<a class=
"ulink" href=
"http://www.python.org/pypi"
<DT><STRONG>'short string'
</STRONG></DT>
<DD>A single line of text, not more than
200 characters.
<DT><STRONG>'long string'
</STRONG></DT>
<DD>Multiple lines of plain text in reStructuredText
format (see
<a class=
"url" href=
"http://docutils.sf.net/">http://docutils.sf.net/
</a>).
<DT><STRONG>'list of strings'
</STRONG></DT>
None of the string values may be Unicode.
Encoding the version information is an art in itself. Python packages
generally adhere to the version format
<em>major.minor
<big>[
</big>.patch
<big>]
</big><big>[
</big>sub
<big>]
</big></em>. The major number is
initial, experimental releases of software. It is incremented for
releases that represent major milestones in a package. The minor
number is incremented when important new features are added to the
package. The patch number increments when bug-fix releases are
made. Additional trailing version information is sometimes used to
indicate sub-releases. These are
"a1,a2,...,aN" (for alpha releases,
where functionality and API may change),
"b1,b2,...,bN" (for beta
releases, which only fix bugs) and
"pr1,pr2,...,prN" (for final
pre-release release testing). Some examples:
<DT><STRONG>0.1.0</STRONG></DT>
<DD>the first, experimental release of a package
<DT><STRONG>1.0.1a2
</STRONG></DT>
<DD>the second alpha release of the first patch version of
1.0
<span class=
"du-option">classifiers
</span> are specified in a python list:
<div class=
"verbatim"><pre>
'Development Status ::
4 - Beta',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Python Software Foundation License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Communications :: Email',
'Topic :: Office/Business',
'Topic :: Software Development :: Bug Tracking',
If you wish to include classifiers in your
<span class=
"file">setup.py
</span> file and also
wish to remain backwards-compatible with Python releases prior to
2.2.3,
then you can include the following code fragment in your
<span class=
"file">setup.py
</span>
before the
<tt class=
"function">setup()
</tt> call.
<div class=
"verbatim"><pre>
# patch distutils if it can't cope with the
"classifiers" or
#
"download_url" keywords
if sys.version
< '
2.2.3':
from distutils.dist import DistributionMetadata
DistributionMetadata.classifiers = None
DistributionMetadata.download_url = None
<div class='online-navigation'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"2.6 Installing Additional Files"
href=
"node12.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"2. Writing the Setup"
href=
"setup-script.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"2.8 Debugging the setup"
href=
"node14.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Distributing Python Modules
</td>
<td class='online-navigation'
><img src='../icons/blank.png'
border='
0' height='
32' alt='' width='
32'
/></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"node12.html">2.6 Installing Additional Files
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"setup-script.html">2. Writing the Setup
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"node14.html">2.8 Debugging the setup
</A>
<span class=
"release-info">Release
2.4.2, documentation updated on
28 September
2005.
</span>
<!--End of Navigation Panel-->
See
<i><a href=
"about.html">About this document...
</a></i> for information on suggesting changes.