-
-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathbuiltdist.po
More file actions
910 lines (761 loc) · 36.8 KB
/
Copy pathbuiltdist.po
File metadata and controls
910 lines (761 loc) · 36.8 KB
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-03 16:35+0000\n"
"PO-Revision-Date: 2025-09-22 17:54+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../distutils/builtdist.rst:5
msgid "Creating Built Distributions"
msgstr "创建构建分发版"
#: ../../distutils/_setuptools_disclaimer.rst:3
msgid ""
"This document is being retained solely until the ``setuptools`` "
"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html"
" independently covers all of the relevant information currently included "
"here."
msgstr ""
"这篇文档是历史遗留文档,在 https://setuptools.readthedocs.io/en/latest/setuptools.html 上的"
" ``setuptools`` 文档独立涵盖此处包含的所有相关信息之后,将不再单独作为正式文档保留。"
#: ../../distutils/builtdist.rst:9
msgid ""
"A \"built distribution\" is what you're probably used to thinking of either "
"as a \"binary package\" or an \"installer\" (depending on your background)."
" It's not necessarily binary, though, because it might contain only Python "
"source code and/or byte-code; and we don't call it a package, because that "
"word is already spoken for in Python. (And \"installer\" is a term specific"
" to the world of mainstream desktop systems.)"
msgstr ""
"“构建分发版”即你通常所认为的“二进制包”或“安装程序”(取决于你的技术背景)。 但它并不一定是二进制的,因为它可能只包含 Python "
"源代码和/或字节码;并且我们也不将其称为包,因为这个词在 Python 中已经被使用。 (而“安装程序”是主流桌面系统领域的一个专有术语。)"
#: ../../distutils/builtdist.rst:16
msgid ""
"A built distribution is how you make life as easy as possible for installers"
" of your module distribution: for users of RPM-based Linux systems, it's a "
"binary RPM; for Windows users, it's an executable installer; for Debian-"
"based Linux users, it's a Debian package; and so forth. Obviously, no one "
"person will be able to create built distributions for every platform under "
"the sun, so the Distutils are designed to enable module developers to "
"concentrate on their specialty---writing code and creating source "
"distributions---while an intermediary species called *packagers* springs up "
"to turn source distributions into built distributions for as many platforms "
"as there are packagers."
msgstr ""
"分发版可以让你的模块分发安装器尽可能地方便易用:对于基于 RPM 的 Linux 系统的用户,它将为二进制 RPM;对于 Windows "
"的用户,它将为可执行文件安装器;对于基于 Debian 的 Linux 用户,它将为 Debian 安装包;诸如此类。 "
"显然,没有人能为世界上所有的系统平台都构建分发版,因此 Distutils 被设计用来让模块开发者能够专注于他们的专长 --- "
"编写代码并创建源代码分发版 --- 而让另一群作为中介的 *打包者* 负责在尽可能多的受支持系统平台上将源代码分发版转换为构建分发版。"
#: ../../distutils/builtdist.rst:26
msgid ""
"Of course, the module developer could be their own packager; or the packager"
" could be a volunteer \"out there\" somewhere who has access to a platform "
"which the original developer does not; or it could be software periodically "
"grabbing new source distributions and turning them into built distributions "
"for as many platforms as the software has access to. Regardless of who they"
" are, a packager uses the setup script and the :command:`bdist` command "
"family to generate built distributions."
msgstr ""
"当然,模块开发者可以是自己模块的打包者;或者打包者也可以是住在别处的“某一位”能够接触到原始开发者接触不到的特定系统平台的志愿者;或者还可以是一个定期抓取新的源代码分发版并在尽可能多的受支持系统平台上将其转换为构建分发版的软件。"
" 无论他们属于哪一种,打包者都会使用设置脚本和 :command:`bdist` 命令族来生成构建分发版。"
#: ../../distutils/builtdist.rst:34
msgid ""
"As a simple example, if I run the following command in the Distutils source "
"tree::"
msgstr "作为一个简单示例,如果我在 Distutils 源代码树中运行以下命令::"
#: ../../distutils/builtdist.rst:39
msgid ""
"then the Distutils builds my module distribution (the Distutils itself in "
"this case), does a \"fake\" installation (also in the :file:`build` "
"directory), and creates the default type of built distribution for my "
"platform. The default format for built distributions is a \"dumb\" tar file"
" on Unix, and a simple executable installer on Windows. (That tar file is "
"considered \"dumb\" because it has to be unpacked in a specific location to "
"work.)"
msgstr ""
"则 Distutils 将构建我的模块分发版(在此情况下即 Distutils 本身),执行“模拟”安装(同样是在 :file:`build` "
"目录中),并为我的系统平台创建默认类型的构建分发版。 构建分发版的默认格式在 Unix 上是一个“非自动” tar 文件,而在 Windows "
"上则是一个简单的可执行文件安装器。 (此 tar 文件被称为“非自动”是因为它必须在指定的位置上解包方可使用。)"
#: ../../distutils/builtdist.rst:46
msgid ""
"Thus, the above command on a Unix system creates "
":file:`Distutils-1.0.{plat}.tar.gz`; unpacking this tarball from the right "
"place installs the Distutils just as though you had downloaded the source "
"distribution and run ``python setup.py install``. (The \"right place\" is "
"either the root of the filesystem or Python's :file:`{prefix}` directory, "
"depending on the options given to the :command:`bdist_dumb` command; the "
"default is to make dumb distributions relative to :file:`{prefix}`.)"
msgstr ""
"这样,上述命令在 Unix 系统上将会创建 :file:`Distutils-1.0.{plat}.tar.gz`;在正确的位置上解包这个 tar "
"文件将会装好 Distutils,就像是你下载了源代码分发版并运行 ``python setup.py install`` 一样。 "
"(这个“正确的位置”可能是文件系统根目录或 Python 的 :file:`{prefix}` 目录,具体取决于提供给 "
":command:`bdist_dumb` 命令的选项;在默认情况下是相对于 :file:`{prefix}` 创建非自动颁发版。)"
#: ../../distutils/builtdist.rst:54
msgid ""
"Obviously, for pure Python distributions, this isn't any simpler than just "
"running ``python setup.py install``\\ ---but for non-pure distributions, "
"which include extensions that would need to be compiled, it can mean the "
"difference between someone being able to use your extensions or not. And "
"creating \"smart\" built distributions, such as an RPM package or an "
"executable installer for Windows, is far more convenient for users even if "
"your distribution doesn't include any extensions."
msgstr ""
"显然,对于纯粹的 Python 分发版来说,这并不比运行 ``python setup.py install`` 更简单 --- "
"但是对于包括需要被编译的扩展的非纯粹的分发版来说,就可能是有人能使用你的扩展而有人不能使用的差别。 而创建“自动”构建分发版,例如 RPM 包或 "
"Windows 的可执行文件安装器,对于用户来说就会更加方便,即使你的分发版不包括任何扩展。"
#: ../../distutils/builtdist.rst:62
msgid ""
"The :command:`bdist` command has a :option:`!--formats` option, similar to "
"the :command:`sdist` command, which you can use to select the types of built"
" distribution to generate: for example, ::"
msgstr ""
":command:`bdist` 命令有一个 :option:`!--formats` 选项,与 :command:`sdist` "
"命令类似,你可以用该选项来选择要生成的构建分发版类型:例如,::"
#: ../../distutils/builtdist.rst:68
msgid ""
"would, when run on a Unix system, create :file:`Distutils-1.0.{plat}.zip`\\ "
"---again, this archive would be unpacked from the root directory to install "
"the Distutils."
msgstr ""
"当在 Unix 系统上运行时,会再次创建 :file:`Distutils-1.0.{plat}.zip`,这个归档文件将从根目录被解包以安装 "
"Distutils。"
#: ../../distutils/builtdist.rst:72
msgid "The available formats for built distributions are:"
msgstr "构建分发版的可用格式有:"
#: ../../distutils/builtdist.rst:75
msgid "Format"
msgstr "格式"
#: ../../distutils/builtdist.rst:75
msgid "Description"
msgstr "描述"
#: ../../distutils/builtdist.rst:75
msgid "Notes"
msgstr "备注"
#: ../../distutils/builtdist.rst:77
msgid "``gztar``"
msgstr "``gztar``"
#: ../../distutils/builtdist.rst:77
msgid "gzipped tar file (:file:`.tar.gz`)"
msgstr "gzipped tar 文件 (:file:`.tar.gz`)"
#: ../../distutils/builtdist.rst:77
msgid "\\(1)"
msgstr "\\(1)"
#: ../../distutils/builtdist.rst:80
msgid "``bztar``"
msgstr "``bztar``"
#: ../../distutils/builtdist.rst:80
msgid "bzipped tar file (:file:`.tar.bz2`)"
msgstr "bzipped tar 文件 (:file:`.tar.bz2`)"
#: ../../distutils/builtdist.rst:83
msgid "``xztar``"
msgstr "``xztar``"
#: ../../distutils/builtdist.rst:83
msgid "xzipped tar file (:file:`.tar.xz`)"
msgstr "xzipped tar 文件 (:file:`.tar.xz`)"
#: ../../distutils/builtdist.rst:86
msgid "``ztar``"
msgstr "``ztar``"
#: ../../distutils/builtdist.rst:86
msgid "compressed tar file (:file:`.tar.Z`)"
msgstr "带压缩的 tar 文件 (:file:`.tar.Z`)"
#: ../../distutils/builtdist.rst:86
msgid "\\(3)"
msgstr "\\(3)"
#: ../../distutils/builtdist.rst:89
msgid "``tar``"
msgstr "``tar``"
#: ../../distutils/builtdist.rst:89
msgid "tar file (:file:`.tar`)"
msgstr "tar 文件 (:file:`.tar`)"
#: ../../distutils/builtdist.rst:91
msgid "``zip``"
msgstr "``zip``"
#: ../../distutils/builtdist.rst:91
msgid "zip file (:file:`.zip`)"
msgstr "zip 文件 (:file:`.zip`)"
#: ../../distutils/builtdist.rst:91
msgid "(2),(4)"
msgstr "(2),(4)"
#: ../../distutils/builtdist.rst:93
msgid "``rpm``"
msgstr "``rpm``"
#: ../../distutils/builtdist.rst:93
msgid "RPM"
msgstr "RPM"
#: ../../distutils/builtdist.rst:93
msgid "\\(5)"
msgstr "\\(5)"
#: ../../distutils/builtdist.rst:95
msgid "``pkgtool``"
msgstr "``pkgtool``"
#: ../../distutils/builtdist.rst:95
msgid "Solaris :program:`pkgtool`"
msgstr "Solaris :program:`pkgtool`"
#: ../../distutils/builtdist.rst:97
msgid "``sdux``"
msgstr "``sdux``"
#: ../../distutils/builtdist.rst:97
msgid "HP-UX :program:`swinstall`"
msgstr "HP-UX :program:`swinstall`"
#: ../../distutils/builtdist.rst:99
msgid "``wininst``"
msgstr "``wininst``"
#: ../../distutils/builtdist.rst:99
msgid "self-extracting ZIP file for Windows"
msgstr "Windows的自解压ZIP文件"
#: ../../distutils/builtdist.rst:99
msgid "\\(4)"
msgstr "\\(4)"
#: ../../distutils/builtdist.rst:102
msgid "``msi``"
msgstr "``msi``"
#: ../../distutils/builtdist.rst:102
msgid "Microsoft Installer."
msgstr "Microsoft安装程序。"
#: ../../distutils/builtdist.rst:105
msgid "Added support for the ``xztar`` format."
msgstr "添加了对 ``xztar`` 格式的支持"
#: ../../distutils/builtdist.rst:109
msgid "Notes:"
msgstr "注释:"
#: ../../distutils/builtdist.rst:112
msgid "default on Unix"
msgstr "默认 Unix"
#: ../../distutils/builtdist.rst:115
msgid "default on Windows"
msgstr "默认Windows"
#: ../../distutils/builtdist.rst:118
msgid "requires external :program:`compress` utility."
msgstr "需要外部 :program:`compress` 工具。"
#: ../../distutils/builtdist.rst:121
msgid ""
"requires either external :program:`zip` utility or :mod:`zipfile` module "
"(part of the standard Python library since Python 1.6)"
msgstr ""
"需要有外部 :program:`zip` 工具或 :mod:`zipfile` 模块(自 Python 1.6 起是标准 Python 库的一部分)"
#: ../../distutils/builtdist.rst:125
msgid ""
"requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm"
" --version`` to find out which version you have)"
msgstr ""
"需要有外部 :program:`rpm` 工具,版本号为 3.0.4 或以上(可使用 ``rpm --version`` 查看你所使用的版本)"
#: ../../distutils/builtdist.rst:128
msgid ""
"You don't have to use the :command:`bdist` command with the :option:`!--"
"formats` option; you can also use the command that directly implements the "
"format you're interested in. Some of these :command:`bdist` \"sub-"
"commands\" actually generate several similar formats; for instance, the "
":command:`bdist_dumb` command generates all the \"dumb\" archive formats "
"(``tar``, ``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and "
":command:`bdist_rpm` generates both binary and source RPMs. The "
":command:`bdist` sub-commands, and the formats generated by each, are:"
msgstr ""
"你不必附带 :option:`!--formats` 来使用 :command:`bdist` 命令;你还可以使用直接实现了你想要的特定格式的命令。 "
"某些这样的 :command:`bdist` \"子命令\" 实际上会生成几种相似的格式;例如,:command:`bdist_dumb` "
"命令将生成所有 \"非自动\" 归档格式 (``tar``, ``gztar``, ``bztar``, ``xztar``, ``ztar`` 和 "
"``zip``),而 :command:`bdist_rpm` 将同时生成二进制和源代码 RPM。 :command:`bdist` "
"子命令以及每个子命令所生成的格式如下:"
#: ../../distutils/builtdist.rst:138
msgid "Command"
msgstr "命令"
#: ../../distutils/builtdist.rst:138
msgid "Formats"
msgstr "格式"
#: ../../distutils/builtdist.rst:140
msgid ":command:`bdist_dumb`"
msgstr ":command:`bdist_dumb`"
#: ../../distutils/builtdist.rst:140
msgid "tar, gztar, bztar, xztar, ztar, zip"
msgstr "tar, gztar, bztar, xztar, ztar, zip"
#: ../../distutils/builtdist.rst:142
msgid ":command:`bdist_rpm`"
msgstr ":command:`bdist_rpm`"
#: ../../distutils/builtdist.rst:142
msgid "rpm, srpm"
msgstr "rpm, srpm"
#: ../../distutils/builtdist.rst:144
msgid ":command:`bdist_wininst`"
msgstr ":command:`bdist_wininst`"
#: ../../distutils/builtdist.rst:144
msgid "wininst"
msgstr "wininst"
#: ../../distutils/builtdist.rst:146
msgid ":command:`bdist_msi`"
msgstr ":command:`bdist_msi`"
#: ../../distutils/builtdist.rst:146
msgid "msi"
msgstr "msi"
#: ../../distutils/builtdist.rst:150 ../../distutils/builtdist.rst:308
#: ../../distutils/builtdist.rst:476
msgid "bdist_wininst is deprecated since Python 3.8."
msgstr "从Python 3.8开始不推荐使用 bdist_wininst"
#: ../../distutils/builtdist.rst:153 ../../distutils/builtdist.rst:311
#: ../../distutils/builtdist.rst:479
msgid "bdist_msi is deprecated since Python 3.9."
msgstr "bdist_msi 从 Python 3.9 起被弃用。"
#: ../../distutils/builtdist.rst:155
msgid ""
"The following sections give details on the individual :command:`bdist_\\*` "
"commands."
msgstr "以下小节提供了每个 :command:`bdist_\\*` 命令的详情。"
#: ../../distutils/builtdist.rst:171
msgid "Creating RPM packages"
msgstr "创建RPM软件包"
#: ../../distutils/builtdist.rst:173
msgid ""
"The RPM format is used by many popular Linux distributions, including Red "
"Hat, SuSE, and Mandrake. If one of these (or any of the other RPM-based "
"Linux distributions) is your usual environment, creating RPM packages for "
"other users of that same distribution is trivial. Depending on the "
"complexity of your module distribution and differences between Linux "
"distributions, you may also be able to create RPMs that work on different "
"RPM-based distributions."
msgstr ""
"RPM 格式被许多流行的 Linux 发行版所使用,包括 Red Hat, SuSE 和 Mandrake。 如果其中(或任何其他基于 RPM 的 "
"Linux 发行版)的某一个是你的常用环境,那么为相同发行版的其他用户创建 RPM 包是很容易的。 根据你的模块分发版的复杂度以及 Linux "
"发行版之间的差异性,你还可能创建适用于多个基于 RPM 的发行版的 RPM 包。"
#: ../../distutils/builtdist.rst:180
msgid ""
"The usual way to create an RPM of your module distribution is to run the "
":command:`bdist_rpm` command::"
msgstr "为你的模块分发版创建 RPM 的通常方式是运行 :command:`bdist_rpm` 命令::"
#: ../../distutils/builtdist.rst:185
msgid "or the :command:`bdist` command with the :option:`!--format` option::"
msgstr "或者 :command:`bdist` 命令附带 :option:`!--format` 选项::"
#: ../../distutils/builtdist.rst:189
msgid ""
"The former allows you to specify RPM-specific options; the latter allows "
"you to easily specify multiple formats in one run. If you need to do both, "
"you can explicitly specify multiple :command:`bdist_\\*` commands and their "
"options::"
msgstr ""
"前者允许你指定 RPM 专属的选项;后者允许你方便地一次性指定多种格式。 如果这两样你全都要,你可以显式地指定多个 "
":command:`bdist_\\*` 命令及其选项::"
#: ../../distutils/builtdist.rst:196
msgid ""
"Creating RPM packages is driven by a :file:`.spec` file, much as using the "
"Distutils is driven by the setup script. To make your life easier, the "
":command:`bdist_rpm` command normally creates a :file:`.spec` file based on "
"the information you supply in the setup script, on the command line, and in "
"any Distutils configuration files. Various options and sections in the "
":file:`.spec` file are derived from options in the setup script as follows:"
msgstr ""
"创建 RPM 包的操作是由 :file:`.spec` 文件驱动的,就像 Distutils 的使用是由 setup 脚本驱动的一样。 "
"为了让你更方便,:command:`bdist_rpm` 命令通常会根据你在 setup 脚本、命令行和任意 Distutils "
"配置文件中提供的信息创建一个 :file:`.spec` 文件。 :file:`.spec` 文件中的各种选项和小节从 setup "
"脚本中派生的情况如下:"
#: ../../distutils/builtdist.rst:204 ../../distutils/builtdist.rst:228
msgid "RPM :file:`.spec` file option or section"
msgstr "RPM :file:`.spec` 文件配置或选项"
#: ../../distutils/builtdist.rst:204
msgid "Distutils setup script option"
msgstr "Distutils安装脚本选项"
#: ../../distutils/builtdist.rst:206
msgid "Name"
msgstr "名称"
#: ../../distutils/builtdist.rst:206
msgid "``name``"
msgstr "``name``"
#: ../../distutils/builtdist.rst:208
msgid "Summary (in preamble)"
msgstr "摘要(在序言中)"
#: ../../distutils/builtdist.rst:208
msgid "``description``"
msgstr "``description``"
#: ../../distutils/builtdist.rst:210
msgid "Version"
msgstr "版本"
#: ../../distutils/builtdist.rst:210
msgid "``version``"
msgstr "``version``"
#: ../../distutils/builtdist.rst:212 ../../distutils/builtdist.rst:235
msgid "Vendor"
msgstr "供应商"
#: ../../distutils/builtdist.rst:212
msgid ""
"``author`` and ``author_email``, or --- & ``maintainer`` and "
"``maintainer_email``"
msgstr ""
"``author`` 和 ``author_email``, 或 --- & ``maintainer`` 和 ``maintainer_email``"
#: ../../distutils/builtdist.rst:216
msgid "Copyright"
msgstr "版权所有"
#: ../../distutils/builtdist.rst:216
msgid "``license``"
msgstr "``license``"
#: ../../distutils/builtdist.rst:218
msgid "Url"
msgstr "Url"
#: ../../distutils/builtdist.rst:218
msgid "``url``"
msgstr "``url``"
#: ../../distutils/builtdist.rst:220
msgid "%description (section)"
msgstr "%d描述(部分)"
#: ../../distutils/builtdist.rst:220
msgid "``long_description``"
msgstr "``long_description``"
#: ../../distutils/builtdist.rst:223
msgid ""
"Additionally, there are many options in :file:`.spec` files that don't have "
"corresponding options in the setup script. Most of these are handled "
"through options to the :command:`bdist_rpm` command as follows:"
msgstr ""
"此外,在 :file:`.spec` 文件中还有许多选项在 setup 脚本中没有对应的选项。 这些选项大多是通过传给 "
":command:`bdist_rpm` 命令的选项来处理的,如下所示:"
#: ../../distutils/builtdist.rst:228
msgid ":command:`bdist_rpm` option"
msgstr ":command:`bdist_rpm` 选项"
#: ../../distutils/builtdist.rst:228
msgid "default value"
msgstr "默认值"
#: ../../distutils/builtdist.rst:231
msgid "Release"
msgstr "发布版本"
#: ../../distutils/builtdist.rst:231
msgid "``release``"
msgstr "``release``"
#: ../../distutils/builtdist.rst:231
msgid "\"1\""
msgstr "\"1\""
#: ../../distutils/builtdist.rst:233
msgid "Group"
msgstr "组织"
#: ../../distutils/builtdist.rst:233
msgid "``group``"
msgstr "``group``"
#: ../../distutils/builtdist.rst:233
msgid "\"Development/Libraries\""
msgstr "\"Development/Libraries\""
#: ../../distutils/builtdist.rst:235
msgid "``vendor``"
msgstr "``vendor``"
#: ../../distutils/builtdist.rst:235
msgid "(see above)"
msgstr "(同上)"
#: ../../distutils/builtdist.rst:237
msgid "Packager"
msgstr "打包"
#: ../../distutils/builtdist.rst:237
msgid "``packager``"
msgstr "``packager``"
#: ../../distutils/builtdist.rst:237 ../../distutils/builtdist.rst:239
#: ../../distutils/builtdist.rst:241 ../../distutils/builtdist.rst:243
#: ../../distutils/builtdist.rst:245 ../../distutils/builtdist.rst:247
#: ../../distutils/builtdist.rst:249 ../../distutils/builtdist.rst:251
msgid "(none)"
msgstr "(none)"
#: ../../distutils/builtdist.rst:239
msgid "Provides"
msgstr "提供"
#: ../../distutils/builtdist.rst:239
msgid "``provides``"
msgstr "``provides``"
#: ../../distutils/builtdist.rst:241
msgid "Requires"
msgstr "需求"
#: ../../distutils/builtdist.rst:241
msgid "``requires``"
msgstr "``requires``"
#: ../../distutils/builtdist.rst:243
msgid "Conflicts"
msgstr "冲突"
#: ../../distutils/builtdist.rst:243
msgid "``conflicts``"
msgstr "``conflicts``"
#: ../../distutils/builtdist.rst:245
msgid "Obsoletes"
msgstr "淘汰"
#: ../../distutils/builtdist.rst:245
msgid "``obsoletes``"
msgstr "``obsoletes``"
#: ../../distutils/builtdist.rst:247
msgid "Distribution"
msgstr " 发行"
#: ../../distutils/builtdist.rst:247
msgid "``distribution_name``"
msgstr "``distribution_name``"
#: ../../distutils/builtdist.rst:249
msgid "BuildRequires"
msgstr "构建要求"
#: ../../distutils/builtdist.rst:249
msgid "``build_requires``"
msgstr "``build_requires``"
#: ../../distutils/builtdist.rst:251
msgid "Icon"
msgstr "Icon"
#: ../../distutils/builtdist.rst:251
msgid "``icon``"
msgstr "``icon``"
#: ../../distutils/builtdist.rst:254
msgid ""
"Obviously, supplying even a few of these options on the command-line would "
"be tedious and error-prone, so it's usually best to put them in the setup "
"configuration file, :file:`setup.cfg`\\ ---see section :ref:`setup-config`."
" If you distribute or package many Python module distributions, you might "
"want to put options that apply to all of them in your personal Distutils "
"configuration file (:file:`~/.pydistutils.cfg`). If you want to temporarily"
" disable this file, you can pass the :option:`!--no-user-cfg` option to "
":file:`setup.py`."
msgstr ""
"显然,即使是在命令行中提供少量的此类选项也是很繁琐易出错的,因此通常最好是将它们放在 setup 配置文件 :file:`setup.cfg` 中,参见"
" :ref:`setup-config` 一节。 如果你要分发或打包许多 Python 模块分发版,你可能会需要将适用于所有这些分发版的选项放在你私人的"
" Distutils 配置文件中 (:file:`~/.pydistutils.cfg`)。 如果你想要临时禁用此文件,你可以将 :option:`!"
"--no-user-cfg` 选项传给 :file:`setup.py`。"
#: ../../distutils/builtdist.rst:262
msgid ""
"There are three steps to building a binary RPM package, all of which are "
"handled automatically by the Distutils:"
msgstr "构建一个二进制 RPM 包有三个步骤,它们全都是由 Distutils 自动处理的:"
#: ../../distutils/builtdist.rst:265
msgid ""
"create a :file:`.spec` file, which describes the package (analogous to the "
"Distutils setup script; in fact, much of the information in the setup "
"script winds up in the :file:`.spec` file)"
msgstr ""
"创建一个 :file:`.spec` 文件,该文件对包进行了描述(类似于 Distutils setup 脚本;实际上 setup "
"脚本中的许多信息都会出现在 :file:`.spec` 文件中)"
#: ../../distutils/builtdist.rst:269
msgid "create the source RPM"
msgstr "创建源 RPM"
#: ../../distutils/builtdist.rst:271
msgid ""
"create the \"binary\" RPM (which may or may not contain binary code, "
"depending on whether your module distribution contains Python extensions)"
msgstr "创建“二进制”RPM(其中可能包含二进制代码也可能不包含,具体取决于你的模块分发版是否包含 Python 扩展)"
#: ../../distutils/builtdist.rst:274
msgid ""
"Normally, RPM bundles the last two steps together; when you use the "
"Distutils, all three steps are typically bundled together."
msgstr "通常,RPM 会将后两个步骤捆绑在一起;当你使用 Distutils 时,三个步骤通常都会捆绑在一起。"
#: ../../distutils/builtdist.rst:277
msgid ""
"If you wish, you can separate these three steps. You can use the :option:`!"
"--spec-only` option to make :command:`bdist_rpm` just create the "
":file:`.spec` file and exit; in this case, the :file:`.spec` file will be "
"written to the \"distribution directory\"---normally :file:`dist/`, but "
"customizable with the :option:`!--dist-dir` option. (Normally, the "
":file:`.spec` file winds up deep in the \"build tree,\" in a temporary "
"directory created by :command:`bdist_rpm`.)"
msgstr ""
"如果你愿意,你也可以将这三个步骤分开。 你可以使用 :option:`!--spec-only` 选项来让 :command:`bdist_rpm` "
"只创建 :file:`.spec` 文件并退出;在这种情况下,:file:`.spec` 文件将被写到“分发目录” --- 通常为 "
":file:`dist/`,但可通过 :option:`!--dist-dir` 选项来自定义。 (通常,:file:`.spec` "
"文件会位于“构建树”的深处,在 :command:`bdist_rpm` 所创建的一个临时目录中。)"
#: ../../distutils/builtdist.rst:305
msgid "Creating Windows Installers"
msgstr ""
#: ../../distutils/builtdist.rst:313
msgid ""
"Executable installers are the natural format for binary distributions on "
"Windows. They display a nice graphical user interface, display some "
"information about the module distribution to be installed taken from the "
"metadata in the setup script, let the user select a few options, and start "
"or cancel the installation."
msgstr ""
#: ../../distutils/builtdist.rst:319
msgid ""
"Since the metadata is taken from the setup script, creating Windows "
"installers is usually as easy as running::"
msgstr ""
#: ../../distutils/builtdist.rst:324
msgid "or the :command:`bdist` command with the :option:`!--formats` option::"
msgstr ""
#: ../../distutils/builtdist.rst:328
msgid ""
"If you have a pure module distribution (only containing pure Python modules "
"and packages), the resulting installer will be version independent and have "
"a name like :file:`foo-1.0.win32.exe`. Note that creating ``wininst`` binary"
" distributions in only supported on Windows systems."
msgstr ""
#: ../../distutils/builtdist.rst:333
msgid ""
"If you have a non-pure distribution, the extensions can only be created on a"
" Windows platform, and will be Python version dependent. The installer "
"filename will reflect this and now has the form "
":file:`foo-1.0.win32-py2.0.exe`. You have to create a separate installer "
"for every Python version you want to support."
msgstr ""
#: ../../distutils/builtdist.rst:339
msgid ""
"The installer will try to compile pure modules into :term:`bytecode` after "
"installation on the target system in normal and optimizing mode. If you "
"don't want this to happen for some reason, you can run the "
":command:`bdist_wininst` command with the :option:`!--no-target-compile` "
"and/or the :option:`!--no-target-optimize` option."
msgstr ""
#: ../../distutils/builtdist.rst:345
msgid ""
"By default the installer will display the cool \"Python Powered\" logo when "
"it is run, but you can also supply your own 152x261 bitmap which must be a "
"Windows :file:`.bmp` file with the :option:`!--bitmap` option."
msgstr ""
#: ../../distutils/builtdist.rst:349
msgid ""
"The installer will also display a large title on the desktop background "
"window when it is run, which is constructed from the name of your "
"distribution and the version number. This can be changed to another text by"
" using the :option:`!--title` option."
msgstr ""
#: ../../distutils/builtdist.rst:354
msgid ""
"The installer file will be written to the \"distribution directory\" --- "
"normally :file:`dist/`, but customizable with the :option:`!--dist-dir` "
"option."
msgstr ""
#: ../../distutils/builtdist.rst:360
msgid "Cross-compiling on Windows"
msgstr "在 Windows 上的交叉编译"
#: ../../distutils/builtdist.rst:362
msgid ""
"Starting with Python 2.6, distutils is capable of cross-compiling between "
"Windows platforms. In practice, this means that with the correct tools "
"installed, you can use a 32bit version of Windows to create 64bit extensions"
" and vice-versa."
msgstr ""
"从 Python 2.6 开始,distutils 能够在不同 Windows 平台之间执行交叉编译。 实际上,这意味着只要安装了正确的工具,你可以使用"
" 32 位版 Windows 来创建 64 位的扩展或是反向操作。"
#: ../../distutils/builtdist.rst:367
msgid ""
"To build for an alternate platform, specify the :option:`!--plat-name` "
"option to the build command. Valid values are currently 'win32', and 'win-"
"amd64'. For example, on a 32bit version of Windows, you could execute::"
msgstr ""
"要针对替代平台进行编译,请为构建命令指定 :option:`!--plat-name` 选项。 目前的有效值为 'win32' 和d 'win-"
"amd64'。 例如,在 32 位版 Windows 上,你可以执行::"
#: ../../distutils/builtdist.rst:373
msgid ""
"to build a 64bit version of your extension. The Windows Installers also "
"support this option, so the command::"
msgstr ""
#: ../../distutils/builtdist.rst:378
msgid ""
"would create a 64bit installation executable on your 32bit version of "
"Windows."
msgstr "将在你的 32 位版 Windows 上创建一个 64 位版的安装程序可执行文件。"
#: ../../distutils/builtdist.rst:380
msgid ""
"To cross-compile, you must download the Python source code and cross-compile"
" Python itself for the platform you are targeting - it is not possible from "
"a binary installation of Python (as the .lib etc file for other platforms "
"are not included.) In practice, this means the user of a 32 bit operating "
"system will need to use Visual Studio 2008 to open the "
":file:`PCbuild/PCbuild.sln` solution in the Python source tree and build the"
" \"x64\" configuration of the 'pythoncore' project before cross-compiling "
"extensions is possible."
msgstr ""
"要进行交叉编译,你必须下载 Python 源代码并针对你的目标平台交叉编译 Python 本身 —— 使用 Python "
"的二进制安装版是无法做到的(因为其中不包括针对其他平台的 .lib 等文件。) 实际上,这意味着 32 位操作系统的用户将需要使用 Visual "
"Studio 2008 来打开 Python 源代码目录树下的 :file:`PCbuild/PCbuild.sln` 解决方案并构建 "
"'pythoncore' 项目的 \"x64\" 配置之后才能进行扩展的交叉编译。"
#: ../../distutils/builtdist.rst:389
msgid ""
"Note that by default, Visual Studio 2008 does not install 64bit compilers or"
" tools. You may need to reexecute the Visual Studio setup process and "
"select these tools (using Control Panel->[Add/Remove] Programs is a "
"convenient way to check or modify your existing install.)"
msgstr ""
"请注意在默认情况下,Visual Studio 2008 并不会安装 64 位编译器或工具。 你可能需要重新执行 Visual Studio "
"安装过程并选择这些工具(使用控制面板 -> [添加/移除] 程序是检查或修改你的现有安装的一个便捷方式。)"
#: ../../distutils/builtdist.rst:397
msgid "The Postinstallation script"
msgstr "安装后脚本"
#: ../../distutils/builtdist.rst:399
msgid ""
"Starting with Python 2.3, a postinstallation script can be specified with "
"the :option:`!--install-script` option. The basename of the script must be "
"specified, and the script filename must also be listed in the scripts "
"argument to the setup function."
msgstr ""
"从 Python 2.3 开始,可以通过 :option:`!--install-script` 选项指定一个安装后脚本。 "
"必须要指定脚本的主文件名,并且该脚本文件名还必须在传给 setup 函数的参数中列出。"
#: ../../distutils/builtdist.rst:404
msgid ""
"This script will be run at installation time on the target system after all "
"the files have been copied, with ``argv[1]`` set to :option:`!-install`, and"
" again at uninstallation time before the files are removed with ``argv[1]`` "
"set to :option:`!-remove`."
msgstr ""
"在安装时当所有文件拷贝完毕后该脚本将会在目标系统上运行,并将 ``argv[1]`` 设为 "
":option:`!-install`,而在卸载时当文件被移除前会再次运行并将 ``argv[1]`` 设为 :option:`!-remove`。"
#: ../../distutils/builtdist.rst:409
msgid ""
"The installation script runs embedded in the windows installer, every output"
" (``sys.stdout``, ``sys.stderr``) is redirected into a buffer and will be "
"displayed in the GUI after the script has finished."
msgstr ""
"安装脚本嵌入在 Windows 安装程序中运行,每个输出 (``sys.stdout``, ``sys.stderr``) "
"都会被重定向到一个缓冲区并将在脚本完成后显示到 GUI 中。"
#: ../../distutils/builtdist.rst:413
msgid ""
"Some functions especially useful in this context are available as additional"
" built-in functions in the installation script."
msgstr "一些在此上下文中特别有用的功能在安装脚本中作为附加内置函数被提供。"
#: ../../distutils/builtdist.rst:420
msgid ""
"These functions should be called when a directory or file is created by the "
"postinstall script at installation time. It will register *path* with the "
"uninstaller, so that it will be removed when the distribution is "
"uninstalled. To be safe, directories are only removed if they are empty."
msgstr ""
"这些函数应当在安装时的安装后脚本创建某个目录或文件时被调用。 它会将 *path* 注册到卸载程序,这样当分发版被卸载时它将被移除。 "
"安全起见,目录只有在为空时才会被移除。"
#: ../../distutils/builtdist.rst:428
msgid ""
"This function can be used to retrieve special folder locations on Windows "
"like the Start Menu or the Desktop. It returns the full path to the folder."
" *csidl_string* must be one of the following strings::"
msgstr ""
"此函数可被用来获取 Windows 中的特殊文件夹位置如 Start Menu 或 Desktop。 它将返回相应文件夹的完整路径。 "
"*csidl_string* 必须为下列字符串之一::"
#: ../../distutils/builtdist.rst:448
msgid "If the folder cannot be retrieved, :exc:`OSError` is raised."
msgstr "如果文件夹不能被检索到,会触发 :exc:`OSError` 。"
#: ../../distutils/builtdist.rst:450
msgid ""
"Which folders are available depends on the exact Windows version, and "
"probably also the configuration. For details refer to Microsoft's "
"documentation of the :c:func:`SHGetSpecialFolderPath` function."
msgstr ""
"有哪些可用的文件夹取决于的 Windows 的具体版本,并可能受特定配置的影响。 更多细节请参考 Microsoft 有关 "
":c:func:`SHGetSpecialFolderPath` 函数的文档。"
#: ../../distutils/builtdist.rst:457
msgid ""
"This function creates a shortcut. *target* is the path to the program to be "
"started by the shortcut. *description* is the description of the shortcut. "
"*filename* is the title of the shortcut that the user will see. *arguments* "
"specifies the command line arguments, if any. *workdir* is the working "
"directory for the program. *iconpath* is the file containing the icon for "
"the shortcut, and *iconindex* is the index of the icon in the file "
"*iconpath*. Again, for details consult the Microsoft documentation for the "
":class:`IShellLink` interface."
msgstr ""
"此函数会创建一个快捷方式。 *target* 是此快捷方式要启动的程序的路径。 *description* 是快捷方式的描述文本。 *filename*"
" 是用户将看到的快捷方式的标题。 *arguments* 指定命令行参数,如果有的话。 *workdir* 是程序的工作目录。 *iconpath* "
"是包含快捷方式的图标的文件,而 *iconindex* 是 *iconpath* 文件中图标的索引号。 同样地,更多细节请参考 Microsoft 有关"
" :class:`IShellLink` 接口的文档。"
#: ../../distutils/builtdist.rst:468
msgid "Vista User Access Control (UAC)"
msgstr ""
#: ../../distutils/builtdist.rst:470
msgid ""
"Starting with Python 2.6, bdist_wininst supports a :option:`!--user-access-"
"control` option. The default is 'none' (meaning no UAC handling is done), "
"and other valid values are 'auto' (meaning prompt for UAC elevation if "
"Python was installed for all users) and 'force' (meaning always prompt for "
"elevation)."
msgstr ""