Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
245 views
in Technique[技术] by (71.8m points)

python - 什么是setup.py?(What is setup.py?)

谁能解释一下, setup.py是什么,如何配置或使用它?

  ask by Software Enthusiastic translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

setup.py is a python file, which usually tells you that the module/package you are about to install has been packaged and distributed with Distutils, which is the standard for distributing Python Modules.

(setup.py是一个python文件,通常告诉您要安装的模块/软件包已与Distutils打包并分发,Distutils是分发Python模块的标准。)

This allows you to easily install Python packages.

(这使您可以轻松安装Python软件包。)

Often it's enough to write:

(通常写就足够了:)

$ pip install . 

pip will use setup.py to install your module.

(pip将使用setup.py安装模块。)

Avoid calling setup.py directly.

(避免直接调用setup.py 。)

https://docs.python.org/3/installing/index.html#installing-index

(https://docs.python.org/3/installing/index.html#installing-index)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...