Created
May 25, 2018 08:15
-
-
Save href/efa404837f392d6b84f0b36b59b605a2 to your computer and use it in GitHub Desktop.
Installs Suitable with Mitogen using Python 2.7 for Testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
path="$1" | |
set -eu | |
if [ -z "$path" ]; then | |
echo "Please pass an install directory" | |
exit 1 | |
fi | |
if [ -d "$path" ]; then | |
echo "The install directory may not exist" | |
exit 1 | |
fi | |
mkdir "$path" | |
cd "$path" | |
virtualenv -p python2.7 . | |
bin/pip install git+https://github.com/seantis/suitable#egg=suitable | |
curl -O -L https://github.com/dw/mitogen/archive/master.tar.gz | |
tar xzvf master.tar.gz --strip-components=1 | |
bin/pip install -e . | |
cat <<EOF > test.py | |
from suitable import Api, install_strategy_plugins | |
install_strategy_plugins('./ansible_mitogen/plugins/strategy') | |
api = Api('localhost', strategy='mitogen_linear') | |
print api.command('whoami') | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment