简体   繁体   English

用于构建 python package 的 setup.py 文件

[英]setup.py file for building a python package

What are the arguments for the setup function in setup.py file and how should I enclose these arguments in the code. setup.py 文件中设置 function 的 arguments 是什么,我应该如何将这些 arguments 包含在代码中。 What is the significance of the description, long_description and long_description_content_type in python package. python package中的描述,long_description和long_description_content_type的意义是什么。 What does an init .py file does? init .py 文件有什么作用?

The long_description and long_description_content_type fields are only necessary if you are planning to upload your package to PyPI .仅当您计划将 package 上传到PyPI时,才需要long_descriptionlong_description_content_type字段。 The long_description can be just a plain text string, or it can be text formatted with some type of markdown. long_description可以只是一个纯文本字符串,也可以是某种类型的 markdown 格式的文本。 long_description_content_type is used to tell PyPI what flavor of markdown is used for long_description so that PyPI can render it correctly. long_description_content_type用于告诉 PyPI markdown 用于 long_description 的味道,以便 PyPI 可以正确呈现它。 This is explained in the description section of Packaging and distributing projects .这在打包和分发项目描述部分中进行了解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM