-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbuilding.po
257 lines (234 loc) · 13 KB
/
building.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2020, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# tomo, 2018
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-09 18:48+0900\n"
"PO-Revision-Date: 2018-06-29 17:45+0000\n"
"Last-Translator: tomo, 2018\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../extending/building.rst:7
msgid "Building C and C++ Extensions"
msgstr "C および C++ 拡張のビルド"
#: ../../extending/building.rst:9
msgid ""
"A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux, "
"``.pyd`` on Windows), which exports an *initialization function*."
msgstr ""
"CPython の C 拡張は *初期化関数* をエクスポートした共有ライブラリ (例、 "
"Linux の ``.so`` ファイルや Windows の ``.pyd`` ファイル) です。"
#: ../../extending/building.rst:12
msgid ""
"To be importable, the shared library must be available on :envvar:"
"`PYTHONPATH`, and must be named after the module name, with an appropriate "
"extension. When using distutils, the correct filename is generated "
"automatically."
msgstr ""
"インポートできるように、共有ライブラリは使える状態で :envvar:`PYTHONPATH` 上"
"になければならず、ファイル名をモジュール名に揃え、適切な拡張子になっていなけ"
"ればいけません。\n"
"distutils を使っているときは、自動的に正しいファイル名が生成されます。"
#: ../../extending/building.rst:16
msgid "The initialization function has the signature:"
msgstr "初期化関数のシグネチャは次のとおりです:"
#: ../../extending/building.rst:20
msgid ""
"It returns either a fully-initialized module, or a :c:type:`PyModuleDef` "
"instance. See :ref:`initializing-modules` for details."
msgstr ""
"この関数は初期化がモジュールか、 :c:type:`PyModuleDef` インスタンスを返しま"
"す。\n"
"詳しいことは :ref:`initializing-modules` を参照してください。"
#: ../../extending/building.rst:25
msgid ""
"For modules with ASCII-only names, the function must be named "
"``PyInit_<modulename>``, with ``<modulename>`` replaced by the name of the "
"module. When using :ref:`multi-phase-initialization`, non-ASCII module names "
"are allowed. In this case, the initialization function name is "
"``PyInitU_<modulename>``, with ``<modulename>`` encoded using Python's "
"*punycode* encoding with hyphens replaced by underscores. In Python::"
msgstr ""
"名前にASCIIしか使っていないモジュールの場合、関数名は "
"``PyInit_<modulename>`` の ``<modulename>`` をモジュール名で置き換えたもので"
"なければなりません。\n"
":ref:`multi-phase-initialization` を使っているときは、モジュール名にASCII以外"
"の文字も使えます。\n"
"この場合、初期化関数の名前は ``PyInitU_<modulename>`` で、 ``<modulename>`` "
"はハイフンをアンダースコアで置き換えて Python の *punycode* エンコーディング"
"でエンコードしたものになります。\n"
"Python で書くと次のような処理になります::"
#: ../../extending/building.rst:39
msgid ""
"It is possible to export multiple modules from a single shared library by "
"defining multiple initialization functions. However, importing them requires "
"using symbolic links or a custom importer, because by default only the "
"function corresponding to the filename is found. See the *\"Multiple modules "
"in one library\"* section in :pep:`489` for details."
msgstr ""
"1つの共有ライブラリに複数の初期化関数を定義することで、複数のモジュールをエク"
"スポートすることは可能です。\n"
"しかし、デフォルトではファイル名に対応した関数しか見付けようとしないので、複"
"数のモジュールをインポートさせるにはシンボリックリンクか独自のインポーターを"
"使う必要があります。\n"
"詳しいことは :pep:`489` の *\"Multiple modules in one library\"* 節を参照して"
"ください。"
#: ../../extending/building.rst:49
msgid "Building C and C++ Extensions with distutils"
msgstr "distutils による C および C++ 拡張モジュールのビルド"
#: ../../extending/building.rst:53
msgid ""
"Extension modules can be built using distutils, which is included in "
"Python. Since distutils also supports creation of binary packages, users "
"don't necessarily need a compiler and distutils to install the extension."
msgstr ""
"拡張モジュールは Python に含まれる distutils を使ってビルドできます。\n"
"distutils はバイナリパッケージの作成もサポートしているので、ユーザが拡張モ"
"ジュールをインストールする際に、必ずしもコンパイラや distutils が必要というわ"
"けではありません。"
#: ../../extending/building.rst:57
msgid ""
"A distutils package contains a driver script, :file:`setup.py`. This is a "
"plain Python file, which, in the most simple case, could look like this:"
msgstr ""
"distutils ベースのパッケージには、駆動スクリプト (driver script) となる :"
"file:`setup.py` が入っています。\n"
":file:`setup.py` は普通の Python プログラムファイルで、ほとんどの場合以下のよ"
"うな内容になっています:"
#: ../../extending/building.rst:73
msgid "With this :file:`setup.py`, and a file :file:`demo.c`, running ::"
msgstr ""
"この :file:`setup.py` とファイル :file:`demo.c` があるとき、以下のコマンド ::"
#: ../../extending/building.rst:77
msgid ""
"will compile :file:`demo.c`, and produce an extension module named ``demo`` "
"in the :file:`build` directory. Depending on the system, the module file "
"will end up in a subdirectory :file:`build/lib.system`, and may have a name "
"like :file:`demo.so` or :file:`demo.pyd`."
msgstr ""
"を実行すると、 :file:`demo.c` をコンパイルして、 ``demo`` という名前の拡張モ"
"ジュールを :file:`build` ディレクトリ内に生成します。システムによってはモ"
"ジュールファイルは :file:`build/lib.system` サブディレクトリに生成され、 :"
"file:`demo.so` や :file:`demo.pyd` といった名前になることがあります。"
#: ../../extending/building.rst:82
msgid ""
"In the :file:`setup.py`, all execution is performed by calling the ``setup`` "
"function. This takes a variable number of keyword arguments, of which the "
"example above uses only a subset. Specifically, the example specifies meta-"
"information to build packages, and it specifies the contents of the "
"package. Normally, a package will contain additional modules, like Python "
"source modules, documentation, subpackages, etc. Please refer to the "
"distutils documentation in :ref:`distutils-index` to learn more about the "
"features of distutils; this section explains building extension modules only."
msgstr ""
":file:`setup.py` 内では、コマンドの実行はすべて ``setup`` 関数を呼び出して行"
"います。\n"
"この関数は可変個のキーワード引数を取ります。上の例ではその一部を使っているに"
"すぎません。\n"
"もっと具体的にいうと、この例の中ではパッケージをビルドするためのメタ情報と、"
"パッケージの内容を指定しています。\n"
"通常、パッケージには Python ソースモジュールやドキュメント、サブパッケージ等"
"といった別のモジュールも入ります。 \n"
"distutils の機能に関する詳細は、 :ref:`distutils-index` に書かれている "
"distutils のドキュメントを参照してください; この節では拡張モジュールのビルド"
"についてのみ説明します。"
#: ../../extending/building.rst:91
msgid ""
"It is common to pre-compute arguments to :func:`setup`, to better structure "
"the driver script. In the example above, the ``ext_modules`` argument to :"
"func:`~distutils.core.setup` is a list of extension modules, each of which "
"is an instance of the :class:`~distutils.extension.Extension`. In the "
"example, the instance defines an extension named ``demo`` which is build by "
"compiling a single source file, :file:`demo.c`."
msgstr ""
"駆動スクリプトの構成をよりよくするために、 :func:`setup` への引数を前もって計"
"算しておくことがよくあります。\n"
"上の例では、 :func:`~distutils.core.setup` の ``ext_modules`` は拡張モジュー"
"ルのリストで、リストの各々の要素は :class:`~distutils.extension.Extension` ク"
"ラスのインスタンスになっています。\n"
"上の例では、 ``demo`` という名の拡張モジュールを定義していて、単一のソース"
"ファイル :file:`demo.c` をコンパイルしてビルドするよう定義しています。"
#: ../../extending/building.rst:99
msgid ""
"In many cases, building an extension is more complex, since additional "
"preprocessor defines and libraries may be needed. This is demonstrated in "
"the example below."
msgstr ""
"多くの場合、拡張モジュールのビルドはもっと複雑になります。\n"
"というのは、プリプロセッサ定義やライブラリの追加指定が必要になることがあるか"
"らです。\n"
"例えば以下のファイルがその実例です。"
#: ../../extending/building.rst:127
msgid ""
"In this example, :func:`~distutils.core.setup` is called with additional "
"meta-information, which is recommended when distribution packages have to be "
"built. For the extension itself, it specifies preprocessor defines, include "
"directories, library directories, and libraries. Depending on the compiler, "
"distutils passes this information in different ways to the compiler. For "
"example, on Unix, this may result in the compilation commands ::"
msgstr ""
"この例では、メタ情報が追加された状態で :func:`~distutils.core.setup` が呼び出"
"されていますが、配布パッケージを構築するにあたっては、メタ情報を付けておくこ"
"とが推奨されます。\n"
"拡張モジュール自体についてのメタ情報には、プリプロセッサ定義、インクルード"
"ファイルのディレクトリ、ライブラリのディレクトリ、ライブラリといった指定があ"
"ります。\n"
"distutils はこの情報をコンパイラに応じて異なるやり方で引渡します。\n"
"例えば Unix では、上の設定は以下のようなコンパイルコマンドになるかもしれませ"
"ん ::"
#: ../../extending/building.rst:139
msgid ""
"These lines are for demonstration purposes only; distutils users should "
"trust that distutils gets the invocations right."
msgstr ""
"これらのコマンドラインは実演目的で書かれたものです; distutils のユーザは "
"distutils が正しくコマンドを実行すると信用してください。"
#: ../../extending/building.rst:146
msgid "Distributing your extension modules"
msgstr "拡張モジュールの配布"
#: ../../extending/building.rst:148
msgid ""
"When an extension has been successfully build, there are three ways to use "
"it."
msgstr "拡張モジュールをうまくビルドできたら、三通りの使い方があります。"
#: ../../extending/building.rst:150
msgid ""
"End-users will typically want to install the module, they do so by running ::"
msgstr ""
"エンドユーザは普通モジュールをインストールしようと考えます; これには、次を実"
"行します ::"
#: ../../extending/building.rst:154
msgid ""
"Module maintainers should produce source packages; to do so, they run ::"
msgstr ""
"モジュールメンテナはソースパッケージを作成します; これには、次を実行します ::"
#: ../../extending/building.rst:158
msgid ""
"In some cases, additional files need to be included in a source "
"distribution; this is done through a :file:`MANIFEST.in` file; see :ref:"
"`manifest` for details."
msgstr ""
"場合によってはソース配布物に追加のファイルを含める必要があります; これには :"
"file:`MANIFEST.in` ファイルを使います; 詳しくは :ref:`manifest` を参照してく"
"ださい。"
#: ../../extending/building.rst:161
msgid ""
"If the source distribution has been build successfully, maintainers can also "
"create binary distributions. Depending on the platform, one of the following "
"commands can be used to do so. ::"
msgstr ""
"ソースコード配布物をうまく構築できたら、メンテナはバイナリ配布物も作成できま"
"す。プラットフォームに応じて、以下のコマンドのいずれかを使います。 ::"