Skip to content

Commit da1c25b

Browse files
authored
Merge branch 'main' into 866-api-token
2 parents 308659b + 7e4add6 commit da1c25b

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

source/tutorials/packaging-projects.rst

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@ to build the package, and how to upload it to the Python Package Index.
99
A simple project
1010
----------------
1111

12-
This tutorial uses a simple project named ``example_pkg``. If you are unfamiliar
13-
with Python's modules and :term:`import packages <Import Package>`, take a few
14-
minutes to read over the `Python documentation for packages and modules`_. Even
15-
if you already have a project that you want to package up, we recommend
16-
following this tutorial as-is using this example package and then trying with
17-
your own package.
12+
This tutorial uses a simple project named ``example_pkg``. We recommend
13+
following this tutorial as-is using this project, before packaging your own
14+
project.
1815

19-
To create this project locally, create the following file structure:
16+
Create the following file structure locally:
2017

2118
.. code-block:: text
2219
@@ -25,11 +22,13 @@ To create this project locally, create the following file structure:
2522
└── example_pkg/
2623
└── __init__.py
2724
28-
Once you create this structure, you'll want to run all of the commands in this
29-
tutorial within the top-level folder - so be sure to ``cd packaging_tutorial``.
25+
:file:`src/example_pkg/__init__.py` is required to import the directory as a
26+
package, and should be empty. If you are unfamiliar with Python's modules and
27+
:term:`import packages <Import Package>`, take a few minutes to read over the
28+
`Python documentation for packages and modules`_.
3029

31-
:file:`src/example_pkg/__init__.py` is required to import the directory as a package,
32-
and can simply be an empty file.
30+
Once you create this structure, you'll want to run all of the commands in this
31+
tutorial within the ``packaging_tutorial`` directory.
3332

3433
.. _Python documentation for packages and modules:
3534
https://docs.python.org/3/tutorial/modules.html#packages
@@ -38,9 +37,8 @@ and can simply be an empty file.
3837
Creating the package files
3938
--------------------------
4039

41-
You will now create a handful of files to package up this project and prepare it
42-
for distribution. Create the new files listed below and place them in the
43-
project's root directory - you will add content to them in the following steps.
40+
You will now add files that are used to prepare the project for distribution.
41+
When you're done, the project structure will look like this:
4442

4543
.. code-block:: text
4644
@@ -56,8 +54,8 @@ project's root directory - you will add content to them in the following steps.
5654
└── tests/
5755
5856
59-
Creating a test folder
60-
----------------------
57+
Creating a test directory
58+
-------------------------
6159

6260
:file:`tests/` is a placeholder for test files. Leave it empty for now.
6361

@@ -333,11 +331,10 @@ if you'd like.
333331
to write your content.
334332
335333
336-
Because our build script loads :file:`README.md` to provide a ``long_description``
337-
for :func:`setup`, the :file:`README.md` must be included along with your code
338-
when you `generate a source distribution <generating archives>`_.
339-
:ref:`setuptools` 36.4.0 or above will automatically include :file:`README.md`
340-
if it exists.
334+
Because our configuration loads :file:`README.md` to provide a
335+
``long_description``, :file:`README.md` must be included along with your
336+
code when you :ref:`generate a source distribution <generating archives>`.
337+
Recent versions of :ref:`setuptools` will do this automatically.
341338

342339

343340
Creating a LICENSE

0 commit comments

Comments
 (0)