Python打包用户指南

欢迎来到 Python 打包用户指南,这是一个包含教程和参考资料的集合,旨在帮助您使用现代工具分发和安装 Python 包。

本指南由 Python 打包机构GitHub 上维护。我们非常欢迎 贡献和反馈。😊

Welcome to the Python Packaging User Guide, a collection of tutorials and references to help you distribute and install Python packages with modern tools.

This guide is maintained on GitHub by the Python Packaging Authority. We happily accept contributions and feedback. 😊

概述和流程

备注

构建对 Python 打包的理解是一个逐步的过程。耐心和持续的改进是成功的关键。概述和流程部分为您理解 Python 打包生态系统提供了一个起点。

概述 解释了 Python 打包及其在准备和分发项目中的应用。 这一部分帮助您了解如何选择最适合您用例的工具和流程。 它包括什么是打包、它解决了哪些问题以及关键的注意事项。

要了解用于发布代码的工作流概述,请参见 打包流程

备注

Building your understanding of Python packaging is a journey. Patience and continuous improvement are key to success. The overview and flow sections provide a starting point for understanding the Python packaging ecosystem.

The 概述 explains Python packaging and its use when preparing and distributing projects. This section helps you build understanding about selecting the tools and processes that are most suitable for your use case. It includes what packaging is, the problems that it solves, and key considerations.

To get an overview of the workflow used to publish your code, see packaging flow.

教程

Tutorials

教程将引导您完成第一次完成项目所需的步骤。 教程旨在帮助您成功,并为未来的探索提供起点。 教程/索引 部分包括:

  • 一个关于安装包的 教程

  • 一个关于在版本控制项目中管理应用程序依赖项的 教程

  • 一个关于打包和分发项目的 教程

Tutorials walk through the steps needed to complete a project for the first time. Tutorials aim to help you succeed and provide a starting point for future exploration. The 教程 section includes:

指南

Guides

指南提供执行特定任务的步骤。指南更侧重于那些已经熟悉 Python 打包的用户,他们正在寻找具体的信息。

指南/索引 部分提供了三个主要领域的“操作指南”:

  • 包的安装

  • 包的构建和分发

  • 其他杂项主题

Guides provide steps to perform a specific task. Guides are more focused on users who are already familiar with Python packaging and are looking for specific information.

The 指南 section provides "how to" instructions in three major areas: package installation; building and distributing packages; miscellaneous topics.

解释和讨论

Explanations and Discussions

讨论 部分提供有关以下主题的深入解释和讨论,例如:

The 讨论 section for in-depth explanations and discussion about topics, such as:

参考

Reference

  • PyPA 规范 部分包含打包互操作性规范。

  • Python 打包管理局成员维护的 其他项目 列表。

  • 术语 包含 Python 打包中使用的术语的定义。

  • The PyPA 规范 section for packaging interoperability specifications.

  • The list of other projects maintained by members of the Python Packaging Authority.

  • The 术语 for definitions of terms used in Python packaging.