a capistrano recipe to manage pythons with pyenv.
Add this line to your application's Gemfile:
gem 'capistrano-pyenv'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-pyenv
This recipe will install pyenv during deploy:setup
task.
To setup pyenv for your application, add following in you config/deploy.rb
.
# config/deploy.rb
require "capistrano-pyenv"
set :pyenv_python_version, "2.7.3"
Following options are available to manage your pyenv.
:pyenv_branch
- the git branch to installpyenv
from. usemaster
by default.:pyenv_cmd
- thepyenv
command.:pyenv_path
- the path wherepyenv
will be installed. use$HOME/.pyenv
by default.:pyenv_plugins
- pyenv plugins to install. do nothing by default.:pyenv_repository
- repository URL of pyenv.:pyenv_python_dependencies
- depedency packages.:pyenv_python_version
- the python version to install. install2.7.3
by default.:pyenv_use_virtualenv
- create new virtualenv from:pyenv_virtualenv_python_version
.false
by default.:pyenv_python_version
will be treated as the name of the virtualenv if this is turnedtrue
.:pyenv_install_dependencies
- controls whether installing dependencies or not.true
if the required packages are missing.:pyenv_setup_shell
- setup pyenv in your shell config or not.true
by default. users who are using Chef/Puppet may prefer setting this valuefalse
.:pyenv_setup_default_environment
- setupPYENV_ROOT
and updatePATH
to use pyenv over capistrano.true
by default.:pyenv_configure_files
- list of shell configuration files to be configured for pyenv. by default, guessing from user's$SHELL
and$HOME
.:pyenv_configure_basenames
- advanced option for:pyenv_configure_files
. list of filename of your shell configuration files if you don't like the default value of:pyenv_configure_files
.:pyenv_virtualenv_python_version
- the python version to create virtualenv.2.7.3
by default.:pyenv_virtualenv_options
- command-line options for virtualenv.
- 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
- YAMASHITA Yuu (https://github.com/yyuu)
- Geisha Tokyo Entertainment Inc. (http://www.geishatokyo.com/)
MIT