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
335 views
in Technique[技术] by (71.8m points)

python - creating a simple package that can be install via Pip & virtualenv

I would like to create the simplest (hello world package) package that I could install using pip in a virtualenv from a local zip file.

In python i would do

>> from myinstallpackage import mymodule
>> mymodule.sayhello()
hello !

What would be in the setup.py and in the package folder ?

Thanks

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

You have to create account on http://pypi.python.org/. Then you can upload the module on http://pypi.python.org/pypi?%3Aaction=submit_form.

Doc on this site contains all commands like

How to create module which can be upload on pipy?

How to download fro pip?

etc...

You will get help on http://docs.python.org/distutils/index.html

Also you can directly register on http://docs.python.org/distutils/packageindex.html


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

...