Skip to main content

Create and manage bundle packages.

Project description

Version:
1.1.2

Synopsis

A bundle consists of several packages, and can be used as a shortcut in applications and libraries requirements lists.

Bundles are used to follow a common group of packages, or a package with an optional extension feature.

This distribution lets you create bundles, and may also be able to manage installed bundles in the future.

Usage

You can create and upload a bundle to 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()

Note that this requires a .pypirc containing your PyPI login information.

As a setuptools plugin

If you use bundles for extension dependencies then you can use setup.py to manage them.

If you have a library called george, with bundles defined in george.bundles like this:

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"]),
]

With your bundles list you can now tell setup.py where to find it, by adding it to the bundle.bundles entrypoints.

In george’s setup.py add:

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

And then you can manage your bundles with the register_bundles, upload_bundles, and upload_bundles_fix setup commands:

$ python setup.py upload_bundles

Note that you need run setup.py develop or setup.py install first, so that the entry points are properly installed before you run bundle commands. And you need to have your PyPI credentials properly setup in your ~/.pypirc file.

The commands are:

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. upload_bundles 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.

Installation

You can install Bundle either via the Python Package Index (PyPI) or from source.

To install using pip,:

$ pip install bundle

To install using easy_install,:

$ easy_install bundle

If you have downloaded a source tarball you can install it by doing the following,:

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

Getting Help

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to our issue tracker at http://github.com/ask/bundle/issues/

Contributing

Development of Bundle happens at Github: http://github.com/ask/bundle

You are highly encouraged to participate in the development. If you don’t like Github (for some reason) you’re welcome to send regular patches.

License

This software is licensed under the New BSD License. See the LICENSE file in the top distribution directory for the full license text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bundle-1.1.2.tar.gz (9.9 kB view details)

Uploaded Source

File details

Details for the file bundle-1.1.2.tar.gz.

File metadata

  • Download URL: bundle-1.1.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bundle-1.1.2.tar.gz
Algorithm Hash digest
SHA256 e0212778fe83ade02e12eea2f888aa1da253b9b1910314861bc59e7a157036f4
MD5 fae483c4a36bb3554faf4b54cab7af62
BLAKE2b-256 784cc4aebdc888d7645faa0ffb8f3217283606af06db855d5fffad697e544b8b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page