创建和管理捆绑包包。

bundle的Python项目详细描述


Version:1.1.2

概要

一个包由几个包组成,可以用作 应用程序和库需求列表。

束用于跟随 公共包组,或具有可选扩展功能的包。

此发行版允许您创建捆绑包,还可以管理 以后安装的捆绑包。

用法

您可以创建一个包并上传到pypi:

>>> b = Bundle("mybundle", description="Cool bundle",
              version="1.0.0",
              requires=["pkg1", "pkg2>1.3", "pkg3"],
              author="George Costanza",
              author_email="george@vandelay.com",
              url="http://vandelay.com",
              license="BSD")
>>> b.upload()

注意,这需要包含pypi登录信息的.pypirc

作为setuptools插件

如果使用bundle作为扩展依赖项,那么可以使用setup.py 管理他们。

如果您有一个名为george的库,并且在^{tt4}中定义了bundle$ 像这样:

from bundle.extensions import Dist

# version must be a tuple of at least 2 elements,
# e.g. (1, 2), or (1, 2, 6).
from george import VERSION

defaults = {"author": "George Costanza",
            "author_email": "art@vandelay.com",
            "url": "http://vandelay.com",
            "license": "BSD"}
george = Dist("george", VERSION, **defaults)

bundles = [
    george.Bundle("george-with-django",
                  "Bundle installing george and Django",
                  requires=['django>=1.2']),
    george.Bundle("george-in-production",
                  "Bundle for george and deps suitable for production",
                  requires=["celery", "psycopg2", "ultrajson"]),
]

有了bundles列表,您现在可以告诉setup.py在哪里找到它, 通过将其添加到bundle.bundlesentrypoints。

在乔治的setup.py中添加:

setup(
    ...
    entry_points = {
        "bundle.bundles": ["george = george.bundles:bundles"]
    },
)

然后您可以使用register_bundles管理您的包, upload_bundles,和upload_bundles_fix设置命令:

$ python setup.py upload_bundles

注意,您需要运行setup.py developsetup.py install 首先,使入口点在您之前正确安装 运行bundle命令。你需要有你的pypi证书 在~/.pypirc文件中正确设置。

命令是:

upload_bundles:Uploads bundles to PyPI, but only the bundles for which version has not been uploaded before.
register_bundles:
Register the bundles at PyPI. ^{tt9}$ will also register, but this is useful if you only need to change metadata without uploading a new version.
upload_bundles_fix:
Bumps the last version number for all of the bundles and uploads the bundles to PyPI.

安装

您可以通过python包索引(pypi)安装Bundle 或者来源。

使用pip安装,:

$ pip install bundle

使用easy_install,:

安装
$ easy_install bundle

如果你下载了一个源tarball,你可以安装它 执行以下操作:

$ python setup.py build
# python setup.py install # as root

获取帮助

错误跟踪程序

如果您有任何建议、错误报告或烦恼,请报告 我们的问题跟踪者在http://github.com/ask/bundle/issues/

贡献

Bundle的发展发生在github:http://github.com/ask/bundle

我们非常鼓励您参与开发。如果你不知道 像github(出于某种原因)一样,欢迎您发送常规补丁。

许可证

此软件是根据New BSD License授权的。参见LICENSE 文件位于顶级分发目录中,以获取完整的许可证文本。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从ImageIO中排除特定的TIFF读取器?   JavaJMockit和passbyreference。我们中一定有一个人错了(可能是我!)   java Android camera2放弃了牛轧糖的表面,但在棉花糖上工作   java按字符串中出现的顺序对字符数组进行排序   如何获取Groovy生成的java源代码   java无法使用AutoIT和Selenium Webdriver在所需位置/文件夹保存图像   java为什么我的冒泡排序代码会打印出这些奇怪的东西?   java JAXB:typesafeEnumMemberName=“generateName”是否可自定义?   Java编程输入:今天是星期天输出:星期天是今天   java不理解首个OOAD书的吉他示例   java如何从JformattedTextfield检索货币格式值   java可以从相同的源代码生成功能不同的可执行文件吗?