Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
341 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...