@@ -383,30 +383,32 @@ msgid ""
383383"this is to bundle all of the application's dependencies into the archive, "
384384"along with the application code."
385385msgstr ""
386+ "利用 :mod:`zipapp` 模块可以创建独立运行的 Python 程序,以便向最终用户发布,仅需在系统中装有合适版本的 Python "
387+ "即可运行。操作的关键就是把应用程序代码和所有依赖项一起放入打包文件中。"
386388
387389#: ../../library/zipapp.rst:267
388390msgid "The steps to create a standalone archive are as follows:"
389- msgstr ""
391+ msgstr "创建独立运行打包文件的步骤如下: "
390392
391393#: ../../library/zipapp.rst:269
392394msgid ""
393395"Create your application in a directory as normal, so you have a ``myapp`` "
394396"directory containing a ``__main__.py`` file, and any supporting application "
395397"code."
396- msgstr ""
398+ msgstr "照常在某个目录中创建应用程序,于是会有一个 ``myapp`` 目录,里面有个``__main__.py`` 文件,以及所有支持性代码。 "
397399
398400#: ../../library/zipapp.rst:273
399401msgid ""
400402"Install all of your application's dependencies into the ``myapp`` directory,"
401403" using pip:"
402- msgstr ""
404+ msgstr "用 pip 将应用程序的所有依赖项装入 ``myapp`` 目录。 "
403405
404406#: ../../library/zipapp.rst:280
405407msgid ""
406408"(this assumes you have your project requirements in a ``requirements.txt`` "
407409"file - if not, you can just list the dependencies manually on the pip "
408410"command line)."
409- msgstr ""
411+ msgstr "(这里假定在 ``requirements.txt`` 文件中列出了项目所需的依赖项,也可以在 pip 命令行中列出依赖项)。 "
410412
411413#: ../../library/zipapp.rst:284
412414msgid ""
@@ -415,17 +417,21 @@ msgid ""
415417" as you won't be making any further use of pip they aren't required - "
416418"although it won't do any harm if you leave them."
417419msgstr ""
420+ "pip 在 ``myapp`` 中创建的 ``.dist-info`` 目录,是可以删除的。这些目录保存了 pip "
421+ "用于管理包的元数据,由于接下来不会再用到 pip,所以不是必须存在,当然留下来也不会有什么坏处。"
418422
419423#: ../../library/zipapp.rst:289
420424msgid "Package the application using:"
421- msgstr ""
425+ msgstr "用以下命令打包: "
422426
423427#: ../../library/zipapp.rst:295
424428msgid ""
425429"This will produce a standalone executable, which can be run on any machine "
426430"with the appropriate interpreter available. See :ref:`zipapp-specifying-the-"
427431"interpreter` for details. It can be shipped to users as a single file."
428432msgstr ""
433+ "这会生成一个独立的可执行文件,可在任何装有合适解释器的机器上运行。详情参见 :ref:`zipapp-specifying-the-"
434+ "interpreter`。可以单个文件的形式分发给用户。"
429435
430436#: ../../library/zipapp.rst:299
431437msgid ""
@@ -435,10 +441,13 @@ msgid ""
435441"fact that the Python interpreter registers the ``.pyz`` and ``.pyzw`` file "
436442"extensions when installed."
437443msgstr ""
444+ "在 Unix 系统中,``myapp.pyz`` 文件将以原有文件名执行。如果喜欢 “普通”的命令名,可以重命名该文件,去掉扩展名 ``.pyz`` "
445+ "。在 Windows 系统中,``myapp.pyz[w]`` 是可执行文件,因为 Python 解释器在安装时注册了扩展名``.pyz`` 和 "
446+ "``.pyzw`` 。"
438447
439448#: ../../library/zipapp.rst:307
440449msgid "Making a Windows executable"
441- msgstr ""
450+ msgstr "制作 Windows 可执行文件 "
442451
443452#: ../../library/zipapp.rst:309
444453msgid ""
0 commit comments