capistrano-virtualenv
a capistrano recipe to deploy python apps with virtualenv.
Installation
Add this line to your application's Gemfile:
gem 'capistrano-virtualenv'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-virtualenv
Usage
This recipe will create 2 kind of virtualenv during deploy task.
- shared virtualenv
- created in
shared_pathafterdeploy:setup - common libraries are installed here.
- created in
- release virtualenv
- created in
release_pathafterdeploy:finalize_update - per-release virtualenv that can be rolled back.
- created in
To deploy your application with virtualenv, add following in you config/deploy.rb.
# in "config/deploy.rb"
require 'capistrano-virtualenv'
Following options are available to manage your virtualenv.
:virtualenv_bootstrap_python- the python executable which will be used to craete virtualenv. by default "python".:virtualenv_current_path- virtualenv path under:current_path.:virtualenv_current_python- python path under:virtualenv_current_path.:virtualenv_easy_install_options- options foreasy_install. by defaul "--quiet".:virtualenv_install_packages- apt packages dependencies for python.:virtualenv_pip_options- options forpip. by default "--quiet".:virtualenv_pip_install_options- options forpip install.:virtualenv_release_path- virtualenv path under:release_path.:virtualenv_release_python- python path under:virtualenv_release_path.:virtualenv_requirements- the list ofpippackages should be installed tovirtualenv.:virtualenv_requirements_file- the path to the file that describes library dependencies. by default "requirements.txt".:virtualenv_script_url- the download URL ofvirtualenv.py.:virtualenv_shared_path- virtualenv path under:shared_path.:virtualenv_shared_python- python path under:virtualenv_shared_path:virtualenv_use_system- controls whether virtualenv should be use system packages or not. false by default.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Author
- YAMASHITA Yuu (https://github.com/yyuu)
- Geisha Tokyo Entertainment Inc. (http://www.geishatokyo.com/)
License
MIT