@@ -77,13 +77,13 @@ Creating a test directory
7777Creating pyproject.toml
7878-----------------------
7979
80- :file: `pyproject.toml ` is the file that tells build tools (like `` pip ` ` and
81- `` build ` `) what system you are using and what is required for building. The
82- default if this file is missing is to assume a classic setuptools build system,
80+ :file: `pyproject.toml ` is the file that tells build tools (like :ref: ` pip ` and
81+ :ref: ` build `) what system you are using and what is required for building. The
82+ default if this file is missing is to assume a :ref: ` setuptools ` build system,
8383but it is better to be explicit; if you have a :file: `pyproject.toml ` file, you
84- will be able to rely on `` wheel ` ` and other packages being present.
84+ will be able to rely on :ref: ` wheel ` and other packages being present.
8585
86- This file should be ideal for most setuptools projects:
86+ This file should be ideal for most :ref: ` setuptools ` projects:
8787
8888
8989.. code-block :: toml
@@ -103,8 +103,8 @@ not after it is installed.
103103``build-system.build-backend `` is technically optional, but you will get
104104``setuptools.build_meta:__legacy__ `` instead if you forget to include it, so
105105always include it. If you were to use a different build system, such as
106- :ref: `flit ` or `poetry `_ , those would go here, and the configuration details
107- would be completely different than the setuptools configuration described
106+ :ref: `flit ` or :ref: `poetry `, those would go here, and the configuration details
107+ would be completely different than the :ref: ` setuptools ` configuration described
108108below. See :pep: `517 ` and :pep: `518 ` for background and details.
109109
110110
@@ -165,8 +165,9 @@ be required, but can be omitted with newer versions of setuptools and pip.
165165
166166 There are a `variety of metadata and options
167167 <https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html> `_
168- supported here. This is in configparser format; do not place quotes around values.
169- This example package uses a relatively minimal set of metadata:
168+ supported here. This is in :doc: `configparser <python:library/configparser >`
169+ format; do not place quotes around values. This example package uses a
170+ relatively minimal set of ``metadata ``:
170171
171172 - ``name `` is the *distribution name * of your package. This can be any name as
172173 long as it only contains letters, numbers, ``_ `` , and ``- ``. It also must not
@@ -198,7 +199,7 @@ be required, but can be omitted with newer versions of setuptools and pip.
198199 your package will work on. For a complete list of classifiers, see
199200 https://pypi.org/classifiers/.
200201
201- In the options category, we have controls for setuptools itself:
202+ In the `` options `` category, we have controls for setuptools itself:
202203
203204 - ``package_dir `` is a mapping of package names and directories.
204205 An empty package name represents the "root package" --- the directory in
@@ -212,7 +213,7 @@ be required, but can be omitted with newer versions of setuptools and pip.
212213 to use. In this case, the list of packages will be ``example_pkg `` as
213214 that's the only package present.
214215 - ``python_requires `` gives the versions of Python supported by your
215- project. Installers like pip will look back though older versions of
216+ project. Installers like :ref: ` pip ` will look back though older versions of
216217 packages until it finds one that has a matching Python version.
217218
218219 There are many more than the ones mentioned here. See
@@ -303,7 +304,7 @@ be required, but can be omitted with newer versions of setuptools and pip.
303304 subpackages under ``package_dir ``. In this case, the list of packages will
304305 be ``example_pkg `` as that's the only package present.
305306 - ``python_requires `` gives the versions of Python supported by your
306- project. Installers like pip will look back though older versions of
307+ project. Installers like :ref: ` pip ` will look back though older versions of
307308 packages until it finds one that has a matching Python version.
308309
309310 There are many more than the ones mentioned here. See
@@ -367,14 +368,14 @@ Including other files
367368---------------------
368369
369370The files listed above will be included automatically in your
370- :term: `source distribution <Source Distribution (or "sdist")> `. If you want to control what goes in this
371- explicitly, see :ref: `Using MANIFEST.in `.
371+ :term: `source distribution <Source Distribution (or "sdist")> `. If you want to
372+ control what goes in this explicitly, see :ref: `Using MANIFEST.in `.
372373
373374The final :term: `built distribution <Built Distribution> ` will have the Python
374375files in the discovered or listed Python packages. If you want to control what
375376goes here, such as to add data files, see
376- :std: doc: `Including Data Files <setuptools:userguide/datafiles >`
377- from the :std: doc: `setuptools docs <setuptools:index >`.
377+ :doc: `Including Data Files <setuptools:userguide/datafiles >`
378+ from the :doc: `setuptools docs <setuptools:index >`.
378379
379380.. _generating archives :
380381
@@ -385,7 +386,7 @@ The next step is to generate :term:`distribution packages <Distribution
385386Package> ` for the package. These are archives that are uploaded to the Python
386387Package Index and can be installed by :ref: `pip `.
387388
388- Make sure you have the latest version of PyPA's `` build ` ` installed:
389+ Make sure you have the latest version of PyPA's :ref: ` build ` installed:
389390
390391.. tab :: Unix/macOS
391392
@@ -564,7 +565,7 @@ Run the Python interpreter (make sure you're still in your virtualenv):
564565
565566 py
566567
567- and from the interpreter shell import the package:
568+ and import the package:
568569
569570.. code-block :: python
570571
@@ -607,8 +608,5 @@ some things you can do:
607608* Read more about using :ref: `setuptools ` to package libraries in
608609 :doc: `/guides/distributing-packages-using-setuptools `.
609610* Read about :doc: `/guides/packaging-binary-extensions `.
610- * Consider alternatives to :ref: `setuptools ` such as :ref: `flit `, `hatch `_,
611- and `poetry `_.
612-
613- .. _hatch : https://github.com/ofek/hatch
614- .. _poetry : https://python-poetry.org
611+ * Consider alternatives to :ref: `setuptools ` such as :ref: `flit `, :ref: `hatch `,
612+ and :ref: `poetry `.
0 commit comments