@@ -49,12 +49,12 @@ Initial Files
4949setup.py
5050~~~~~~~~
5151
52- The most important file is " setup.py" which exists at the root of your project
52+ The most important file is `` setup.py `` which exists at the root of your project
5353directory. For an example, see the `setup.py
5454<https://github.com/pypa/sampleproject/blob/master/setup.py> `_ in the `PyPA
5555sample project <https://github.com/pypa/sampleproject> `_.
5656
57- " setup.py" serves two primary functions:
57+ `` setup.py `` serves two primary functions:
5858
59591. It's the file where various aspects of your project are configured. The
6060 primary feature of ``setup.py `` is that it contains a global ``setup() ``
@@ -70,22 +70,25 @@ sample project <https://github.com/pypa/sampleproject>`_.
7070setup.cfg
7171~~~~~~~~~
7272
73- " setup.cfg" is an ini file that contains option defaults for ``setup.py ``
73+ `` setup.cfg `` is an ini file that contains option defaults for ``setup.py ``
7474commands. For an example, see the `setup.cfg
7575<https://github.com/pypa/sampleproject/blob/master/setup.cfg> `_ in the `PyPA
7676sample project <https://github.com/pypa/sampleproject> `_.
7777
7878
79- README.rst
80- ~~~~~~~~~~
79+ README.rst / README.md
80+ ~~~~~~~~~~~~~~~~~~~~~~
8181
82- All projects should contain a readme file that covers the goal of the
83- project. The most common format is `reStructuredText
82+ All projects should contain a readme file that covers the goal of the project.
83+ The most common format is `reStructuredText
8484<http://docutils.sourceforge.net/rst.html> `_ with an "rst" extension, although
85- this is not a requirement.
85+ this is not a requirement; the `CommonMark <http://spec.commonmark.org/ >`_
86+ dialect of `Markdown <https://daringfireball.net/projects/markdown/ >`_ is
87+ supported as well (look at ``setup() ``'s :ref: `long_description_content_type
88+ <description>` argument).
8689
87- For an example, see `README.rst
88- <https://github.com/pypa/sampleproject/blob/master/README.rst > `_ from the `PyPA
90+ For an example, see `README.md
91+ <https://github.com/pypa/sampleproject/blob/master/README.md > `_ from the `PyPA
8992sample project <https://github.com/pypa/sampleproject> `_.
9093
9194.. note :: Projects using :ref:`setuptools` have :file:`README.rst` included in
@@ -203,6 +206,7 @@ way is to keep the version in both ``setup.py`` and your code. If you'd rather
203206not duplicate the value, there are a few ways to manage this. See the
204207":ref: `Single sourcing the version `" Advanced Topics section.
205208
209+ .. _`description` :
206210
207211description
208212~~~~~~~~~~~
@@ -211,6 +215,7 @@ description
211215
212216 description='A sample Python project',
213217 long_description=long_description,
218+ long_description_content_type='text/x-rst',
214219
215220Give a short and long description for your project.
216221
@@ -225,6 +230,15 @@ the front-page lists of trending projects and new releases, and the list of
225230projects you maintain within your account profile (such as
226231https://pypi.org/user/jaraco/).
227232
233+ A `content type
234+ <https://packaging.python.org/specifications/core-metadata/#description-content-type-optional> `_
235+ can be specified with the ``long_description_content_type `` argument, which can
236+ be one of ``text/plain ``, ``text/x-rst ``, or ``text/markdown ``, corresponding
237+ to no formatting, `reStructuredText (reST)
238+ <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names> `_,
239+ and the `CommonMark <http://spec.commonmark.org/ >`_ dialect of `Markdown
240+ <https://daringfireball.net/projects/markdown/> `_ respectively.
241+
228242url
229243~~~
230244
@@ -433,8 +447,8 @@ cases you may need to place data files *outside* of your :term:`packages
433447
434448Each (directory, files) pair in the sequence specifies the installation
435449directory and the files to install there. If directory is a relative path, it is
436- interpreted relative to the installation prefix (Python’s sys.prefix for
437- pure-Python :term: `distributions <Distribution Package> `, sys.exec_prefix for
450+ interpreted relative to the installation prefix (Python’s `` sys.prefix `` for
451+ pure-Python :term: `distributions <Distribution Package> `, `` sys.exec_prefix `` for
438452distributions that contain extension modules). Each file name in files is
439453interpreted relative to the ``setup.py `` script at the top of the project source
440454distribution.
@@ -754,7 +768,7 @@ To build the wheel:
754768
755769 python setup.py bdist_wheel --universal
756770
757- You can also permanently set the ``--universal `` flag in " setup.cfg" (e.g., see
771+ You can also permanently set the ``--universal `` flag in `` setup.cfg `` (e.g., see
758772`sampleproject/setup.cfg
759773<https://github.com/pypa/sampleproject/blob/master/setup.cfg> `_):
760774
0 commit comments