Travis gets a special treatment
This commit is contained in:
parent
2962c9d963
commit
dd920222a5
3 changed files with 10 additions and 4 deletions
|
@ -28,5 +28,3 @@ install:
|
|||
|
||||
script:
|
||||
- sudo salt-call --local --config=./ --state-output=changes --log-level=quiet --retcode-passthrough state.apply
|
||||
- which pip
|
||||
- which pip3
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
salt-call --local --config=./ --state-output=changes grains.setvals "{ \"user\": \"$(whoami)\", \"group\": \"$(id -g -n $(whoami))\", \"homedir\": \"$HOME\", \"travis\": True }"
|
||||
salt-call --local --config=./ --state-output=changes grains.setvals "{ \"user\": \"$(whoami)\", \"group\": \"$(id -g -n $(whoami))\", \"homedir\": \"$HOME\", \"travis\": True, \"pip\": \"$(which pip)\" }"
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
{% from "python_env/map.jinja" import python_env with context %}
|
||||
|
||||
{% if grains['travis'] == True and grains['kernel'] == 'Linux' %}
|
||||
{% if "python2" in grains['pip'] %}
|
||||
{% set python_env.pip_bin_env = "/opt/python/3.5.2/bin/pip3" %}
|
||||
{% else %}
|
||||
{% set python_env.pip_bin_env = grains['pip'] %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
pip-install:
|
||||
pkg.installed:
|
||||
- name: {{ python_env.pip }}
|
||||
|
@ -24,7 +32,7 @@ zsh-virtualenvwrapper:
|
|||
file.append:
|
||||
- name: {{ grains.homedir }}/.zshrc
|
||||
- text:
|
||||
- ""
|
||||
- "\n"
|
||||
- "# Adding virtualenvwrapper python binary path"
|
||||
- "export VIRTUALENVWRAPPER_PYTHON={{ python_env.python_path }}"
|
||||
- ""
|
||||
|
|
Loading…
Reference in a new issue