Installation - evansde77/cirrus GitHub Wiki
Installation
This page outlines the various methods by which you can install cirrus and use it with normal python tools such as pyenv, virtualenv and pip.
Basic installation as a user
If you already have a python up and running on your system, you can use the cirrus default installation process.
curl -O https://raw.githubusercontent.com/evansde77/cirrus/develop/installer.sh
bash installer.sh
Using Conda
If your python is based on a conda distribution, there is an installer script for that:
curl -O https://raw.githubusercontent.com/evansde77/cirrus/develop/conda-installer.sh
bash conda-installer.sh
If you have problems with the two automated installers, manual installation via pip and git config is outline below
Uninstalling
By default, cirrus will install itself in ~/.cirrus
.
If you run git cirrus hello
you will see where it is installed.
To uninstall cirrus, you can simply remove this directory and then edit your gitconfig file to remove the cirrus config section and alias.
Installing python, virtualenv and pip
The following guide uses pyenv to install python, virtualenv and pip and set up a standalone python environment. Note that pyenv builds python on your machine, so you may need some headers and development libraries installed to run it, there are some docs on common build issues.
#!/bin/bash
#
# set up a minimal pyenv/virtualenv for cirrus
#
#
export PYENV_ROOT=/opt/pyenvy
mkdir -p /opt/pyenvy
git clone https://github.com/yyuu/pyenv.git ${PYENV_ROOT}
export PATH=${PYENV_ROOT}/bin:${PATH}
eval "$(pyenv init -)"
pyenv install 3.6.2
pyenv global 3.6.2
curl -O https://bootstrap.pypa.io/get-pip.py
python3.6 get-pip.py
pip install --upgrade pip setuptools
pip install virtualenv
# install cirrus in its own virtualenv
mkdir ~/.cirrus
virtualenv ~/.cirrus/venv
. ~/.cirrus/venv/bin/activate
pip install cirrus-cli
# add alias to your git config (expand the HOME variable here)
git config --global alias.cirrus "! $HOME/.cirrus/venv/bin/cirrus"
Common Issues
No gitconfig
If you dont have a ~/.gitconfig file, then you can bootstrap one by running:
git config --global user.name "some_user"
git config --global user.email "some_email"
Complex gitconfig
If you have a complex gitconfig with multiline aliases, you may have problems with the installer parsing your .gitconfig file. In which case it should skip complex lines and add the minimal setup to your gitconfig, but if it doesnt, you can simply add the following settings to your .gitconfig:
git config --global cirrus.github_username "your_username"
git config --global alias.cirrus "! /Users/devans/.cirrus/venv/bin/cirrus"