“Python/docs/3.9/distutils/commandref”的版本间差异

来自菜鸟教程
Python/docs/3.9/distutils/commandref
跳转至:导航、​搜索
(autoload)
 
(Page commit)
 
第1行: 第1行:
 +
{{DISPLAYTITLE:8. 命令参考 — Python 文档}}
 
<div id="command-reference" class="section">
 
<div id="command-reference" class="section">
  
 
<span id="reference"></span>
 
<span id="reference"></span>
= <span class="section-number">8. </span>Command Reference =
+
= 8. 命令参考 =
  
 
<div class="admonition note">
 
<div class="admonition note">
  
注解
+
笔记
  
This document is being retained solely until the <code>setuptools</code> documentation
+
本文档仅保留到 https://setuptools.readthedocs.io/en/latest/setuptools.html 上的 <code>setuptools</code> 文档独立涵盖当前包含在此处的所有相关信息之前。
at https://setuptools.readthedocs.io/en/latest/setuptools.html
 
independently covers all of the relevant information currently included here.
 
  
  
第17行: 第16行:
  
 
<span id="install-cmd"></span>
 
<span id="install-cmd"></span>
== <span class="section-number">8.1. </span>Installing modules: the '''install''' command family ==
+
== 8.1. 安装模块: 安装命令家族 ==
  
The install command ensures that the build commands have been run and then runs
+
install 命令确保构建命令已经运行,然后运行子命令 '''install_lib''''''install_data''' '''install_scripts'''
the subcommands '''install_lib''', '''install_data''' and
 
'''install_scripts'''.
 
  
 
<div id="install-data" class="section">
 
<div id="install-data" class="section">
  
 
<span id="install-data-cmd"></span>
 
<span id="install-data-cmd"></span>
=== <span class="section-number">8.1.1. </span>'''install_data''' ===
+
=== 8.1.1. 安装数据 ===
  
This command installs all data files provided with the distribution.
+
此命令安装随发行版提供的所有数据文件。
  
  
第35行: 第32行:
  
 
<span id="install-scripts-cmd"></span>
 
<span id="install-scripts-cmd"></span>
=== <span class="section-number">8.1.2. </span>'''install_scripts''' ===
+
=== 8.1.2. 安装脚本 ===
  
This command installs all (Python) scripts in the distribution.
+
此命令安装分发中的所有 (Python) 脚本。
  
  
第46行: 第43行:
  
 
<span id="sdist-cmd"></span>
 
<span id="sdist-cmd"></span>
== <span class="section-number">8.2. </span>Creating a source distribution: the '''sdist''' command ==
+
== 8.2. 创建源分发: 数据中心命令 ==
  
The manifest template commands are:
+
清单模板命令是:
  
 
{|
 
{|
!width="48%"| Command
+
!width="48%"| 命令
!width="52%"| Description
+
!width="52%"| 描述
 
|-
 
|-
| '''include pat1 pat2 ...'''
+
| '''包括 pat1 pat2 ...'''
| include all files matching any of the listed
+
| 包括与任何列出的模式匹配的所有文件
patterns
 
 
|-
 
|-
| '''exclude pat1 pat2 ...'''
+
| '''排除 pat1 pat2 ...'''
| exclude all files matching any of the listed
+
| 排除与任何列出的模式匹配的所有文件
patterns
 
 
|-
 
|-
| '''recursive-include dir pat1 pat2
+
| '''递归包含目录 pat1 pat2 ...'''
...'''
+
| 包括 ''dir'' 下与任何列出的模式匹配的所有文件
| include all files under ''dir'' matching any of
 
the listed patterns
 
 
|-
 
|-
| '''recursive-exclude dir pat1 pat2
+
| '''递归排除目录 pat1 pat2 ...'''
...'''
+
| 排除 ''dir'' 下与任何列出的模式匹配的所有文件
| exclude all files under ''dir'' matching any of
 
the listed patterns
 
 
|-
 
|-
| '''global-include pat1 pat2 ...'''
+
| '''全局包含 pat1 pat2 ...'''
| include all files anywhere in the source tree
+
| 包含匹配源树中任何位置的所有文件 - 以及任何列出的模式
matching --- &amp; any of the listed patterns
 
 
|-
 
|-
| '''global-exclude pat1 pat2 ...'''
+
| '''全局排除 pat1 pat2 ...'''
| exclude all files anywhere in the source tree
+
| 排除匹配源树中任何位置的所有文件 - 以及任何列出的模式
matching --- &amp; any of the listed patterns
 
 
|-
 
|-
| '''prune dir'''
+
| '''修剪目录'''
| exclude all files under ''dir''
+
| 排除 ''dir'' 下的所有文件
 
|-
 
|-
| '''graft dir'''
+
| '''移植目录'''
| include all files under ''dir''
+
| 包含 ''dir'' 下的所有文件
 
|}
 
|}
  
The patterns here are Unix-style &quot;glob&quot; patterns: <code>*</code> matches any sequence of
+
这里的模式是 Unix 风格的“glob”模式:<code>*</code> 匹配任何常规文件名字符序列,<code>?</code> 匹配任何单个常规文件名字符,而 <code>[range]</code> 匹配任何一个 ''范围'' 中的字符(例如,<code>a-z</code><code>a-zA-Z</code><code>a-f0-9_.</code>)。 “常规文件名字符”的定义是特定于平台的:在 Unix 上它是除斜杠之外的任何东西; 在 Windows 上,除反斜杠或冒号外的任何内容。
regular filename characters, <code>?</code> matches any single regular filename
 
character, and <code>[range]</code> matches any of the characters in ''range'' (e.g.,
 
<code>a-z</code>, <code>a-zA-Z</code>, <code>a-f0-9_.</code>). The definition of &quot;regular filename
 
character&quot; is platform-specific: on Unix it is anything except slash; on Windows
 
anything except backslash or colon.
 
  
  
第98行: 第82行:
  
 
</div>
 
</div>
 +
<div class="clearer">
  
[[Category:Python 3.9 中文文档]]
+
 
 +
 
 +
</div>
 +
 
 +
[[Category:Python 3.9 文档]]

2021年10月31日 (日) 04:50的最新版本

8. 命令参考

笔记

本文档仅保留到 https://setuptools.readthedocs.io/en/latest/setuptools.html 上的 setuptools 文档独立涵盖当前包含在此处的所有相关信息之前。


8.1. 安装模块: 安装命令家族

install 命令确保构建命令已经运行,然后运行子命令 install_libinstall_datainstall_scripts

8.1.1. 安装数据

此命令安装随发行版提供的所有数据文件。


8.1.2. 安装脚本

此命令安装分发中的所有 (Python) 脚本。


8.2. 创建源分发: 数据中心命令

清单模板命令是:

命令 描述
包括 pat1 pat2 ... 包括与任何列出的模式匹配的所有文件
排除 pat1 pat2 ... 排除与任何列出的模式匹配的所有文件
递归包含目录 pat1 pat2 ... 包括 dir 下与任何列出的模式匹配的所有文件
递归排除目录 pat1 pat2 ... 排除 dir 下与任何列出的模式匹配的所有文件
全局包含 pat1 pat2 ... 包含匹配源树中任何位置的所有文件 - 以及任何列出的模式
全局排除 pat1 pat2 ... 排除匹配源树中任何位置的所有文件 - 以及任何列出的模式
修剪目录 排除 dir 下的所有文件
移植目录 包含 dir 下的所有文件

这里的模式是 Unix 风格的“glob”模式:* 匹配任何常规文件名字符序列,? 匹配任何单个常规文件名字符,而 [range] 匹配任何一个 范围 中的字符(例如,a-za-zA-Za-f0-9_.)。 “常规文件名字符”的定义是特定于平台的:在 Unix 上它是除斜杠之外的任何东西; 在 Windows 上,除反斜杠或冒号外的任何内容。