Skip to content

Commit 9f9b824

Browse files
authored
Merge branch 'main' into 866-package-name
2 parents a556302 + 52c1338 commit 9f9b824

1 file changed

Lines changed: 21 additions & 20 deletions

File tree

source/tutorials/packaging-projects.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@ an escape hatch when absolutely necessary.
190190
the project that contains all Python source files for the package --- so
191191
in this case the ``src`` directory is designated the root package.
192192
- ``packages`` is a list of all Python :term:`import packages <Import
193-
Package>` that should be included in the :term:`Distribution Package`.
194-
Instead of listing each package manually, we can use the ``find:`` directive
195-
to automatically discover all packages and subpackages and
196-
``options.packages.find`` to specify the ``package_dir`` to use. In this
197-
case, the list of packages will be ``example_pkg`` as that's the only
198-
package present.
193+
Package>` that should be included in the :term:`distribution package
194+
<Distribution Package>`. Instead of listing each package manually, we can
195+
use the ``find:`` directive to automatically discover all packages and
196+
subpackages and ``options.packages.find`` to specify the ``package_dir``
197+
to use. In this case, the list of packages will be ``example_pkg`` as
198+
that's the only package present.
199199
- ``python_requires`` gives the versions of Python supported by your
200200
project. Installers like pip will look back though older versions of
201201
packages until it finds one that has a matching Python version.
@@ -303,11 +303,11 @@ an escape hatch when absolutely necessary.
303303
package --- so in this case the ``src`` directory is designated the root
304304
package.
305305
- ``packages`` is a list of all Python :term:`import packages <Import
306-
Package>` that should be included in the :term:`Distribution Package`.
307-
Instead of listing each package manually, we can use :func:`find_packages`
308-
to automatically discover all packages and subpackages under ``package_dir``.
309-
In this case, the list of packages will be ``example_pkg`` as that's the
310-
only package present.
306+
Package>` that should be included in the :term:`distribution package
307+
<Distribution Package>`. Instead of listing each package manually, we can
308+
use :func:`find_packages` to automatically discover all packages and
309+
subpackages under ``package_dir``. In this case, the list of packages will
310+
be ``example_pkg`` as that's the only package present.
311311
- ``python_requires`` gives the versions of Python supported by your
312312
project. Installers like pip will look back though older versions of
313313
packages until it finds one that has a matching Python version.
@@ -438,12 +438,13 @@ files in the :file:`dist` directory:
438438
https://github.com/pypa/packaging-problems/issues/new?title=Trouble+following+packaging+libraries+tutorial
439439

440440

441-
The ``tar.gz`` file is a :term:`Source Archive` whereas the ``.whl`` file is a
442-
:term:`Built Distribution`. Newer :ref:`pip` versions preferentially install
443-
built distributions, but will fall back to source archives if needed. You
444-
should always upload a source archive and provide built archives for the
445-
platforms your project is compatible with. In this case, our example package is
446-
compatible with Python on any platform so only one built distribution is needed.
441+
The ``tar.gz`` file is a :term:`source archive <Source Archive>` whereas the
442+
``.whl`` file is a :term:`built distribution <Built Distribution>`. Newer
443+
:ref:`pip` versions preferentially install built distributions, but will fall
444+
back to source archives if needed. You should always upload a source archive and
445+
provide built archives for the platforms your project is compatible with. In
446+
this case, our example package is compatible with Python on any platform so only
447+
one built distribution is needed.
447448

448449
Uploading the distribution archives
449450
-----------------------------------
@@ -575,9 +576,9 @@ and from the interpreter shell import the package:
575576
576577
>>> import example_pkg
577578
578-
Note that the :term:`Import Package` is ``example_pkg`` regardless of what
579-
name you gave your :term:`Distribution Package`
580-
in :file:`setup.py` (in this case, ``example-pkg-YOUR-USERNAME-HERE``).
579+
Note that the :term:`import package <Import Package>` is ``example_pkg``
580+
regardless of what name you gave your :term:`distribution package <Distribution
581+
Package>` in :file:`setup.py` (in this case, ``example-pkg-YOUR-USERNAME-HERE``).
581582

582583
Next steps
583584
----------

0 commit comments

Comments
 (0)