@@ -5,11 +5,9 @@ This tutorial walks you through how to package a simple Python project. It will
55show you how to add the necessary files and structure to create the package, how
66to build the package, and how to upload it to the Python Package Index (PyPI).
77
8- The example is an **importable Python package **. If your main goal is to turn a
9- Python program into an installed command such as ``my-tool ``, start with the
10- :doc: `command-line tools guide </guides/creating-command-line-tools >`. That
11- guide covers executable entry points; you can then use the build and publishing
12- steps from this tutorial for the resulting project.
8+ The example is an importable Python package. To turn a Python program into an
9+ installed command such as ``my-tool ``, see the
10+ :doc: `command-line tools guide </guides/creating-command-line-tools >`.
1311
1412.. tip ::
1513
@@ -77,19 +75,6 @@ Open that file and enter the following content:
7775 def add_one (number ):
7876 return number + 1
7977
80- Because this tutorial leaves :file: `__init__.py ` empty, ``add_one `` belongs
81- to the ``example `` module rather than being exposed directly on the package.
82- After installation, use it through that module, for example:
83-
84- .. code-block :: pycon
85-
86- >>> from example_package_YOUR_USERNAME_HERE import example
87- >>> example.add_one(2)
88- 3
89-
90- A package can choose to re-export selected names from :file: `__init__.py `,
91- but doing so is an API-design choice and is not required for packaging.
92-
9378 If you are unfamiliar with Python's :term: `modules <Module> ` and
9479:term: `import packages <Import Package> `, take a few minutes to read over the
9580`Python documentation for packages and modules `_.
0 commit comments