44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Freesand Leo <[email protected] >, 201987# ruoyu zhang <[email protected] >, 201998# Harry Liu. <[email protected] >, 2019109# Leo Li <[email protected] >, 20201110# cdarlint <[email protected] >, 202111+ # Dai Xu <[email protected] >, 202112+ # Freesand Leo <[email protected] >, 20211213#
1314#, fuzzy
1415msgid ""
@@ -17,7 +18,7 @@ msgstr ""
1718"Report-Msgid-Bugs-To : \n "
1819"POT-Creation-Date : 2021-01-01 16:02+0000\n "
1920"PO-Revision-Date : 2019-09-01 02:40+0000\n "
20- "Last-Translator : cdarlint <cdarling@126 .com>, 2021\n "
21+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2021\n "
2122"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2223"MIME-Version : 1.0\n "
2324"Content-Type : text/plain; charset=UTF-8\n "
@@ -50,6 +51,8 @@ msgid ""
5051"responsibilities (apart from writing solid, well-documented and well-tested "
5152"code, of course!) are:"
5253msgstr ""
54+ "Distutils "
55+ "用起来非常简单,对于模块开发者或安装第三方模块的用户/管理员均是如此。开发者的责任(当然还有编写可靠、良好文档和经过良好测试的代码!)就是:"
5356
5457#: ../../distutils/introduction.rst:23
5558msgid "write a setup script (:file:`setup.py` by convention)"
@@ -83,6 +86,9 @@ msgid ""
8386"module distributions in the most natural way for their platform, without "
8487"having to run a single setup script or compile a line of code."
8588msgstr ""
89+ "并非所有的模块开发者都能接触到众多的平台,所以期望他们创造众多的内置发行版不是总是可行的。最好是有一类名为 *打包者* "
90+ "的中介,以满足这一需求。打包者将读取模块开发者发布的源代码,在一个或多个平台上进行编译,并发布构建出来的发行版。这样,最流行平台的用户就能以最自然的方式安装最流行的"
91+ " Python 模块发行版,不必运行什么设置脚本或编译代码了。"
8692
8793#: ../../distutils/introduction.rst:47
8894msgid "A Simple Example"
@@ -97,12 +103,14 @@ msgid ""
97103"script may be run multiple times in the course of building and installing "
98104"your module distribution."
99105msgstr ""
106+ "setup 脚本通常很简单,尽管是用 Python 编写的,它能干的事情没有限制,当然应小心别在 setup 脚本中加入什么运行缓慢的操作。与 "
107+ "Autoconf 风格的 configure 脚本不同,在构建和安装模块的过程中 setup 脚本可能会被多次运行。"
100108
101109#: ../../distutils/introduction.rst:56
102110msgid ""
103111"If all you want to do is distribute a module called :mod:`foo`, contained in"
104112" a file :file:`foo.py`, then your setup script can be as simple as this::"
105- msgstr ""
113+ msgstr "如果只想发布一个名为 :mod:`foo` 的模块,位于 :file:`foo.py` 文件中,那么 setup 脚本可以如此简单: "
106114
107115#: ../../distutils/introduction.rst:65
108116msgid "Some observations:"
@@ -112,34 +120,34 @@ msgstr "一些观察:"
112120msgid ""
113121"most information that you supply to the Distutils is supplied as keyword "
114122"arguments to the :func:`setup` function"
115- msgstr ""
123+ msgstr "提供给 Distutils 的大部分信息将作为关键字参数发给 :func:`setup` 函数。 "
116124
117125#: ../../distutils/introduction.rst:70
118126msgid ""
119127"those keyword arguments fall into two categories: package metadata (name, "
120128"version number) and information about what's in the package (a list of pure "
121129"Python modules, in this case)"
122- msgstr ""
130+ msgstr "这些关键字参数分为两类:包的元数据(名称、版本号)和包中内容的描述信息(本例中是纯 Python 模块的列表)。 "
123131
124132#: ../../distutils/introduction.rst:74
125133msgid ""
126134"modules are specified by module name, not filename (the same will hold true "
127135"for packages and extensions)"
128- msgstr ""
136+ msgstr "模块由模块名指定,而不是文件名(包和扩展也是如此)。 "
129137
130138#: ../../distutils/introduction.rst:77
131139msgid ""
132140"it's recommended that you supply a little more metadata, in particular your "
133141"name, email address and a URL for the project (see section :ref:`setup-"
134142"script` for an example)"
135- msgstr ""
143+ msgstr "建议多提供一些元数据,特别是开发者姓名、电子邮件地址和项目的URL(参见 :ref:`setup-script` 中的例子)。 "
136144
137145#: ../../distutils/introduction.rst:81
138146msgid ""
139147"To create a source distribution for this module, you would create a setup "
140148"script, :file:`setup.py`, containing the above code, and run this command "
141149"from a terminal::"
142- msgstr ""
150+ msgstr "要为该模块创建一个源码发布版本,需要创建一段 setup 脚本 :file:`setup.py`,包含上述代码,然后从终端运行以下命令: "
143151
144152#: ../../distutils/introduction.rst:87
145153msgid ""
@@ -164,12 +172,14 @@ msgid ""
164172" is download :file:`foo-1.0.tar.gz` (or :file:`.zip`), unpack it, and---from"
165173" the :file:`foo-1.0` directory---run ::"
166174msgstr ""
175+ "如果最终用户希望安装 :mod:`foo` 模块,只需下载 :file:`foo-1.0.tar.gz` (或 :file:`.zip` )并解压,进入"
176+ " :file:`foo-1.0` 目录运行:"
167177
168178#: ../../distutils/introduction.rst:103
169179msgid ""
170180"which will ultimately copy :file:`foo.py` to the appropriate directory for "
171181"third-party modules in their Python installation."
172- msgstr ""
182+ msgstr "这会把 :file:`foo.py` 复制到 Python 安装环境的第三方模块目录中。 "
173183
174184#: ../../distutils/introduction.rst:106
175185msgid ""
@@ -180,6 +190,9 @@ msgid ""
180190"developers, while :command:`install` is more often for installers (although "
181191"most developers will want to install their own code occasionally)."
182192msgstr ""
193+ "上述简单例子展示了 Distutils 的一些基本概念。首先,开发者和安装者拥有相同的基本用户界面,即 setup 脚本。区别在于使用哪种 "
194+ "Distutils *命令* : :command:`sdist` 命令几乎只适用于模块开发者,而 :command:`install` "
195+ "则更适用于安装者(当然大多数开发者偶尔也想要安装自己的代码)。"
183196
184197#: ../../distutils/introduction.rst:113
185198msgid ""
@@ -205,19 +218,25 @@ msgid ""
205218"(:command:`bdist_sdux`). For example, the following command will create an "
206219"RPM file called :file:`foo-1.0.noarch.rpm`::"
207220msgstr ""
221+ "其他有用的内置分发格式是 RPM,可由 :command:`bdist_rpm` 、Solaris "
222+ ":program:`pkgtool`(:command:`bdist_pkgtool`)和 HP-UX "
223+ ":program:`swinstall`(:command:`bdist_sdux`)实现。比如,以下命令将创建一个名为 "
224+ ":file:`foo-1.0.noarch.rpm` 的RPM文件:"
208225
209226#: ../../distutils/introduction.rst:132
210227msgid ""
211228"(The :command:`bdist_rpm` command uses the :command:`rpm` executable, "
212229"therefore this has to be run on an RPM-based system such as Red Hat Linux, "
213230"SuSE Linux, or Mandrake Linux.)"
214231msgstr ""
232+ "(:command:`bdist_rpm` 命令用到了 :command:`rpm` 可执行文件,因此必须运行在基于 RPM 的系统中,如 Red "
233+ "Hat Linux 、 SuSE Linux 或 Mandrake Linux)。"
215234
216235#: ../../distutils/introduction.rst:136
217236msgid ""
218237"You can find out what distribution formats are available at any time by "
219238"running ::"
220- msgstr ""
239+ msgstr "可以随时运行以下命令,以便了解当前可用的分发格式: "
221240
222241#: ../../distutils/introduction.rst:145
223242msgid "General Python terminology"
@@ -229,7 +248,7 @@ msgid ""
229248"modules, extensions, and so forth are. Nevertheless, just to be sure that "
230249"everyone is operating from a common starting point, we offer the following "
231250"glossary of common Python terms:"
232- msgstr ""
251+ msgstr "本文读者可能对模块、扩展等已有了很好的理解。但为确保所有人都站在同一起点上,下面提供了 Python 常用术语表: "
233252
234253#: ../../distutils/introduction.rst:155
235254msgid "module"
@@ -240,7 +259,7 @@ msgid ""
240259"the basic unit of code reusability in Python: a block of code imported by "
241260"some other code. Three types of modules concern us here: pure Python "
242261"modules, extension modules, and packages."
243- msgstr ""
262+ msgstr "实现 Python 代码重用的基本单位:可被其他代码导入的一段代码。有三种类型的模块与本文有关:纯 Python 模块、扩展模块和包。 "
244263
245264#: ../../distutils/introduction.rst:160
246265msgid "pure Python module"
@@ -252,6 +271,7 @@ msgid ""
252271"possibly associated :file:`.pyc` files). Sometimes referred to as a \" pure "
253272"module.\" "
254273msgstr ""
274+ "用 Python 编写的模块,包含在某 :file:`.py` 文件中(可能还会有相关的 :file:`.pyc` 文件)。有时被称为 \" 纯模块\" 。"
255275
256276#: ../../distutils/introduction.rst:168
257277msgid "extension module"
@@ -267,6 +287,10 @@ msgid ""
267287"extensions. (Note that currently, the Distutils only handles C/C++ "
268288"extensions for Python.)"
269289msgstr ""
290+ "用低级语言编写的 Python 模块。Python 用 C/C++ ,而 Jython 则用Java。通常包含在一个可动态加载的预编译文件中,比如 "
291+ "Unix 中的 Python 扩展是一个共享对象(:file:`.so`)文件,Windows 中的 Python 扩展则是一个 DLL (扩展名为 "
292+ ":file:`.pyd` ),而 Jython 的扩展是个 Java class 文件。(注意,目前,Distutils 只能处理 Python 的 "
293+ "C/C++ 扩展。)"
270294
271295#: ../../distutils/introduction.rst:173
272296msgid "package"
@@ -277,11 +301,11 @@ msgid ""
277301"a module that contains other modules; typically contained in a directory in "
278302"the filesystem and distinguished from other directories by the presence of a"
279303" file :file:`__init__.py`."
280- msgstr ""
304+ msgstr "包含其他模块的模块;通常位于文件系统的某个目录中,区别于其他目录的标记就是存在一个 :file:`__init__.py` 文件。 "
281305
282306#: ../../distutils/introduction.rst:183
283307msgid "root package"
284- msgstr ""
308+ msgstr "根包 "
285309
286310#: ../../distutils/introduction.rst:176
287311msgid ""
@@ -293,6 +317,9 @@ msgid ""
293317" package can be found in many directories: in fact, every directory listed "
294318"in ``sys.path`` contributes modules to the root package."
295319msgstr ""
320+ "包的层次结构的根。(其并非一个真正的包,因为没有 :file:`__init__.py` 文件。但总得给它起个名字)。 "
321+ "绝大多数标准库都在根包中,还有许多不属于任何大型模块的小型、独立的第三方模块。与普通的包不同,根包中的模块可能会在很多目录中出现:事实上,``sys.path``"
322+ " 列出的每个目录都会为根包提供模块。"
296323
297324#: ../../distutils/introduction.rst:188
298325msgid "Distutils-specific terminology"
@@ -302,11 +329,11 @@ msgstr "Distutils 特定的术语"
302329msgid ""
303330"The following terms apply more specifically to the domain of distributing "
304331"Python modules using the Distutils:"
305- msgstr ""
332+ msgstr "以下属于更加特别地用于 Distutils 发布 Python 模块。 "
306333
307334#: ../../distutils/introduction.rst:199
308335msgid "module distribution"
309- msgstr ""
336+ msgstr "模块的发布 "
310337
311338#: ../../distutils/introduction.rst:194
312339msgid ""
@@ -317,34 +344,37 @@ msgid ""
317344" a single module distribution may contain zero, one, or many Python "
318345"packages.)"
319346msgstr ""
347+ "一组 Python 模块,作为可下载的资源组团发布,以便 *大规模* 安装。模块发布版的著名例子是 NumPy 、 SciPy 、 Pillow 或 "
348+ "mxBase。(这些会被称为 *package*,这个词在 Python 的语境中也使用过:一个模块发行版可能包含零个、一个或多个 Python 包。)"
320349
321350#: ../../distutils/introduction.rst:203
322351msgid "pure module distribution"
323- msgstr ""
352+ msgstr "纯模块发行版 "
324353
325354#: ../../distutils/introduction.rst:202
326355msgid ""
327356"a module distribution that contains only pure Python modules and packages. "
328357"Sometimes referred to as a \" pure distribution.\" "
329- msgstr ""
358+ msgstr "只包含纯 Python 模块和软件包的模块发布版。有时被称为“纯发行版”。 "
330359
331360#: ../../distutils/introduction.rst:207
332361msgid "non-pure module distribution"
333- msgstr ""
362+ msgstr "非纯模块发行版 "
334363
335364#: ../../distutils/introduction.rst:206
336365msgid ""
337366"a module distribution that contains at least one extension module. "
338367"Sometimes referred to as a \" non-pure distribution.\" "
339- msgstr ""
368+ msgstr "至少包含一个扩展模块的模块发行版。 有时被称为“非纯发行版”。 "
340369
341370#: ../../distutils/introduction.rst:211
342371msgid "distribution root"
343- msgstr ""
372+ msgstr "根发行版 "
344373
345374#: ../../distutils/introduction.rst:210
346375msgid ""
347376"the top-level directory of your source tree (or source distribution); the "
348377"directory where :file:`setup.py` exists. Generally :file:`setup.py` will "
349378"be run from this directory."
350379msgstr ""
380+ "源代码树(或源代码发行版)的顶级目录;即 :file:`setup.py` 所在的目录。 一般来说,:file:`setup.py` 会在该目录下运行。"
0 commit comments