python 世界中的bundler ( bundler equivalent in Python )

发布时间: 2014-08-19 06:06:00

copied from :

简言之,就是使用  requirement.txt

From what i've read about bundler — pip without virtualenv should work just fine for you. You can think of it as something between regular gem command and bundler. Common things that you can do with pip:

Installing packages (gem install)

pip install mypackage
Dependencies and bulk-install (gemfile)

Probably the easiest way is to use pip's requirements.txt files. Basically it's just a plain list of required packages with possible version constraints. It might look something like:

Later when you'd want to install those dependencies you would do:

$ pip install -r requirements.txt
A simple way to see all your current packages in requirements-file syntax is to do:

$ pip freeze
You can read more about it here.

Execution (bundler exec)

All python packages that come with executable files are usually directly available after install (unless you have custom setup or it's a special package). For example:

$ pip install gunicorn
$ gunicorn -h
Package gems for install from cache (bundler package)

There is pip bundle and pip zip/unzip. But i'm not sure if many people use it.