Skip to content

Commit 91618e0

Browse files
Update messages.pot as of version a6c4683
1 parent 0d42890 commit 91618e0

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

locales/messages.pot

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python Packaging User Guide \n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-09-16 02:08+0000\n"
11+
"POT-Creation-Date: 2025-09-16 02:15+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -3085,79 +3085,79 @@ msgstr ""
30853085
msgid "The actual code responsible for the tool's functionality will be stored in the file :file:`greet.py`, named after the main module:"
30863086
msgstr ""
30873087

3088-
#: ../source/guides/creating-command-line-tools.rst:73
3088+
#: ../source/guides/creating-command-line-tools.rst:62
30893089
msgid "The above function receives several keyword arguments that determine how the greeting to output is constructed. Now, construct the command-line interface to provision it with the same, which is done in :file:`cli.py`:"
30903090
msgstr ""
30913091

3092-
#: ../source/guides/creating-command-line-tools.rst:91
3092+
#: ../source/guides/creating-command-line-tools.rst:80
30933093
msgid "The command-line interface is built with typer_, an easy-to-use CLI parser based on Python type hints. It provides auto-completion and nicely styled command-line help out of the box. Another option would be :py:mod:`argparse`, a command-line parser which is included in Python's standard library. It is sufficient for most needs, but requires a lot of code, usually in ``cli.py``, to function properly. Alternatively, docopt_ makes it possible to create CLI interfaces based solely on docstrings; advanced users are encouraged to make use of click_ (on which ``typer`` is based)."
30943094
msgstr ""
30953095

3096-
#: ../source/guides/creating-command-line-tools.rst:97
3096+
#: ../source/guides/creating-command-line-tools.rst:86
30973097
msgid "Now, add an empty :file:`__init__.py` file, to define the project as a regular :term:`import package <Import Package>`."
30983098
msgstr ""
30993099

3100-
#: ../source/guides/creating-command-line-tools.rst:99
3100+
#: ../source/guides/creating-command-line-tools.rst:88
31013101
msgid "The file :file:`__main__.py` marks the main entry point for the application when running it via :mod:`runpy` (i.e. ``python -m greetings``, which works immediately with flat layout, but requires installation of the package with src layout), so initialize the command-line interface here:"
31023102
msgstr ""
31033103

3104-
#: ../source/guides/creating-command-line-tools.rst:111
3104+
#: ../source/guides/creating-command-line-tools.rst:100
31053105
msgid "In order to enable calling the command-line interface directly from the :term:`source tree <Project Source Tree>`, i.e. as ``python src/greetings``, a certain hack could be placed in this file; read more at :ref:`running-cli-from-source-src-layout`."
31063106
msgstr ""
31073107

3108-
#: ../source/guides/creating-command-line-tools.rst:117
3108+
#: ../source/guides/creating-command-line-tools.rst:106
31093109
msgid "``pyproject.toml``"
31103110
msgstr ""
31113111

3112-
#: ../source/guides/creating-command-line-tools.rst:119
3112+
#: ../source/guides/creating-command-line-tools.rst:108
31133113
msgid "The project's :term:`metadata <Pyproject Metadata>` is placed in :term:`pyproject.toml`. The :term:`pyproject metadata keys <Pyproject Metadata Key>` and the ``[build-system]`` table may be filled in as described in :ref:`writing-pyproject-toml`, adding a dependency on ``typer`` (this tutorial uses version *0.12.3*)."
31143114
msgstr ""
31153115

3116-
#: ../source/guides/creating-command-line-tools.rst:122
3116+
#: ../source/guides/creating-command-line-tools.rst:111
31173117
msgid "For the project to be recognised as a command-line tool, additionally a ``console_scripts`` :ref:`entry point <entry-points>` (see :ref:`console_scripts`) needs to be added as a :term:`subkey <Pyproject Metadata Subkey>`:"
31183118
msgstr ""
31193119

3120-
#: ../source/guides/creating-command-line-tools.rst:129
3120+
#: ../source/guides/creating-command-line-tools.rst:118
31213121
msgid "Now, the project's source tree is ready to be transformed into a :term:`distribution package <Distribution Package>`, which makes it installable."
31223122
msgstr ""
31233123

3124-
#: ../source/guides/creating-command-line-tools.rst:134
3124+
#: ../source/guides/creating-command-line-tools.rst:123
31253125
msgid "Installing the package with ``pipx``"
31263126
msgstr ""
31273127

3128-
#: ../source/guides/creating-command-line-tools.rst:136
3128+
#: ../source/guides/creating-command-line-tools.rst:125
31293129
msgid "After installing ``pipx`` as described in :ref:`installing-stand-alone-command-line-tools`, install your project:"
31303130
msgstr ""
31313131

3132-
#: ../source/guides/creating-command-line-tools.rst:143
3132+
#: ../source/guides/creating-command-line-tools.rst:132
31333133
msgid "This will expose the executable script we defined as an entry point and make the command ``greet`` available. Let's test it:"
31343134
msgstr ""
31353135

3136-
#: ../source/guides/creating-command-line-tools.rst:155
3136+
#: ../source/guides/creating-command-line-tools.rst:146
31373137
msgid "Since this example uses ``typer``, you could now also get an overview of the program's usage by calling it with the ``--help`` option, or configure completions via the ``--install-completion`` option."
31383138
msgstr ""
31393139

3140-
#: ../source/guides/creating-command-line-tools.rst:158
3140+
#: ../source/guides/creating-command-line-tools.rst:149
31413141
msgid "To just run the program without installing it permanently, use ``pipx run``, which will create a temporary (but cached) virtual environment for it:"
31423142
msgstr ""
31433143

3144-
#: ../source/guides/creating-command-line-tools.rst:165
3144+
#: ../source/guides/creating-command-line-tools.rst:156
31453145
msgid "This syntax is a bit impractical, however; as the name of the entry point we defined above does not match the package name, we need to state explicitly which executable script to run (even though there is only on in existence)."
31463146
msgstr ""
31473147

3148-
#: ../source/guides/creating-command-line-tools.rst:168
3148+
#: ../source/guides/creating-command-line-tools.rst:159
31493149
msgid "There is, however, a more practical solution to this problem, in the form of an entry point specific to ``pipx run``. The same can be defined as follows in :file:`pyproject.toml`:"
31503150
msgstr ""
31513151

3152-
#: ../source/guides/creating-command-line-tools.rst:177
3152+
#: ../source/guides/creating-command-line-tools.rst:168
31533153
msgid "Thanks to this entry point (which *must* match the package name), ``pipx`` will pick up the executable script as the default one and run it, which makes this command possible:"
31543154
msgstr ""
31553155

3156-
#: ../source/guides/creating-command-line-tools.rst:185
3156+
#: ../source/guides/creating-command-line-tools.rst:176
31573157
msgid "Conclusion"
31583158
msgstr ""
31593159

3160-
#: ../source/guides/creating-command-line-tools.rst:187
3160+
#: ../source/guides/creating-command-line-tools.rst:178
31613161
msgid "You know by now how to package a command-line application written in Python. A further step could be to distribute your package, meaning uploading it to a :term:`package index <Package Index>`, most commonly :term:`PyPI <Python Package Index (PyPI)>`. To do that, follow the instructions at :ref:`Packaging your project`. And once you're done, don't forget to :ref:`do some research <analyzing-pypi-package-downloads>` on how your package is received!"
31623162
msgstr ""
31633163

0 commit comments

Comments
 (0)