Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c440af5

Browse files
committed
Updated information on package metadata to reflect recent additions.
This is a modified form of SF patch #718027 (mostly markup changes).
1 parent 40f19e3 commit c440af5

1 file changed

Lines changed: 68 additions & 33 deletions

File tree

Doc/dist/dist.tex

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -687,38 +687,74 @@ \subsection{Additional meta-data}
687687
The setup script may include additional meta-data beyond the name and
688688
version. This information includes:
689689

690-
\begin{tableiii}{l|l|c}{code}%
691-
{Meta-Data}{Description}{Notes}
692-
\lineiii{name}{the name of the package}{(1)}
693-
\lineiii{version}{the version of this release}{(1)}
694-
\lineiii{author}{package author's name}{(2)}
695-
\lineiii{author_email}{email address of the package author}{(2)}
696-
\lineiii{maintainer}{package maintainer's name}{(2)}
697-
\lineiii{maintainer_email}{email address of the package maintainer}{(2)}
698-
\lineiii{url}{URL of the package's home page}{(1)}
699-
\lineiii{license}{the terms the package is released under}{}
700-
\lineiii{description}{a short, summary description of the package}{}
701-
\lineiii{long_description}{a longer description of the package}{}
702-
\lineiii{keywords}{some keywords appropriate to the package}{}
703-
\lineiii{platforms}{a list of the target platforms}{}
704-
\lineiii{classifiers}{a list of Trove classifiers}{(3),(4)}
705-
\lineiii{download_url}{a single URL containing the download location
706-
for this version of the package}{(3)}
707-
\end{tableiii}
690+
\begin{tableiv}{l|l|l|c}{code}%
691+
{Meta-Data}{Description}{Value}{Notes}
692+
\lineiv{name}{name of the package}
693+
{short string}{(1)}
694+
\lineiv{version}{version of this release}
695+
{short string}{(1)(2)}
696+
\lineiv{author}{package author's name}
697+
{short string}{(3)}
698+
\lineiv{author_email}{email address of the package author}
699+
{email address}{(3)}
700+
\lineiv{maintainer}{package maintainer's name}
701+
{short string}{(3)}
702+
\lineiv{maintainer_email}{email address of the package maintainer}
703+
{email address}{(3)}
704+
\lineiv{url}{home page for the package}
705+
{URL}{(1)}
706+
\lineiv{description}{short, summary description of the package}
707+
{short string}{}
708+
\lineiv{long_description}{longer description of the package}
709+
{long string}{}
710+
\lineiv{download_url}{location where the package may be downloaded}
711+
{URL}{(4)}
712+
\lineiv{classifiers}{a list of Trove classifiers}
713+
{list of strings}{(4)}
714+
\end{tableiv}
708715

709716
\noindent Notes:
710717
\begin{description}
711-
\item[(1)] these fields are required
712-
\item[(2)] either the author or the maintainer must be nominated
713-
\item[(3)] should not be used if your package is to be compatible with
714-
Python versions prior to 2.2.3 or 2.3.
715-
\item[(4)] The list of classifiers is available from the
716-
PyPI website (\url{http://www.python.org/pypi}).
717-
\option{classifiers} are specified as a list of strings:
718+
\item[(1)] These fields are required.
719+
\item[(2)] It is recommended that versions take the form
720+
\emph{major.minor\optional{.patch\optional{.sub}}}.
721+
\item[(3)] Either the author or the maintainer must be identified.
722+
\item[(4)] These fields should not be used if your package is to be
723+
compatible with Python versions prior to 2.2.3 or 2.3. The list is
724+
available from the \ulink{PyPI website}{http://www.python.org/pypi}.
725+
726+
\item["short string"] A single line of text, not more than 200 characters.
727+
\item["long string"] Multiple lines of plain text in ReStructuredText
728+
format (see \url{http://docutils.sf.net/}).
729+
\item["list of strings"] See below.
730+
\end{description}
731+
732+
None of the string values may be Unicode.
733+
734+
Encoding the version information is an art in itself. Python packages
735+
generally adhere to the version format
736+
\emph{major.minor\optional{.patch}\optional{sub}}. The major number is
737+
0 for
738+
initial, experimental releases of software. It is incremented for
739+
releases that represent major milestones in a package. The minor
740+
number is incremented when important new features are added to the
741+
package. The patch number increments when bug-fix releases are
742+
made. Additional trailing version information is sometimes used to
743+
indicate sub-releases. These are "a1,a2,...,aN" (for alpha releases,
744+
where functionality and API may change), "b1,b2,...,bN" (for beta
745+
releases, which only fix bugs) and "pr1,pr2,...,prN" (for final
746+
pre-release release testing). Some examples:
747+
748+
\begin{description}
749+
\item[0.1.0] the first, experimental release of a package
750+
\item[1.0.1a2] the second alpha release of the first patch version of 1.0
751+
\end{description}
752+
753+
\option{classifiers} are specified in a python list:
718754

719755
\begin{verbatim}
720756
setup(...
721-
classifiers=[
757+
classifiers = [
722758
'Development Status :: 4 - Beta',
723759
'Environment :: Console',
724760
'Environment :: Web Environment',
@@ -734,18 +770,17 @@ \subsection{Additional meta-data}
734770
'Topic :: Office/Business',
735771
'Topic :: Software Development :: Bug Tracking',
736772
],
737-
...
738773
)
739774
\end{verbatim}
740-
\end{description}
741775

742-
If you wish to include classifiers or a download URL in your
743-
\file{setup.py} file and also wish to remain backwards-compatible with
744-
Python releases prior to 2.2.3, then you can include the following
745-
code fragment in your \file{setup.py} before the \code{setup()} call:
776+
If you wish to include classifiers in your \file{setup.py} file and also
777+
wish to remain backwards-compatible with Python releases prior to 2.2.3,
778+
then you can include the following code fragment in your \file{setup.py}
779+
before the \code{setup()} call.
746780

747781
\begin{verbatim}
748-
# patch distutils if it can't cope with the "classifiers" keyword
782+
# patch distutils if it can't cope with the "classifiers" or
783+
# "download_url" keywords
749784
if sys.version < '2.2.3':
750785
from distutils.dist import DistributionMetadata
751786
DistributionMetadata.classifiers = None

0 commit comments

Comments
 (0)