创建一个可以通过Pip& amp;安装的简单软件包虚拟环境 [英] creating a simple package that can be install via Pip & virtualenv

查看:98
本文介绍了创建一个可以通过Pip& amp;安装的简单软件包虚拟环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个最简单的(hello world软件包)软件包,可以使用pip在本地压缩文件的virtualenv中安装它.

在python中我会做

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

setup.py和包文件夹中会有什么?

谢谢

解决方案

您必须在 http://pypi.python.org/上创建帐户.然后,您可以将模块上传到 http://pypi.python.org/pypi?%3Aaction=submit_form

此站点上的文档包含所有命令,例如

如何创建可以在pipy上上传的模块?

如何从pip下载?

等...

您将在 http://docs.python.org/distutils/index.html 上获得帮助/p>

您还可以直接在 http://docs.python.org/distutils/packageindex.html 上注册

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

解决方案

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

这篇关于创建一个可以通过Pip& amp;安装的简单软件包虚拟环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆