<commit_before>include:
  - pkgs.system.python-pip


{#- Ubuntu Lucid has way too old pip package, we'll need to upgrade "by hand", salt can't do it for us #}
{% if grains['os'] == 'Ubuntu' and grains['osrelease'].startswith('10.') %}
pip-cmd:
  cmd.run:
    - name: pip install --upgrade pip --install-option="--prefix=/usr"
    - reload_modules: true
    - require:
      - pkg: python-pip
  pkg.removed:
    - name: python-pip
{% endif %}

pip:
  pip.installed:
    {%- if salt['config.get']('virtualenv_name', None) %}
    - bin_env: /srv/virtualenvs/{{ salt['config.get']('virtualenv_name') }}
    {%- endif %}
    - index_url: https://pypi-jenkins.saltstack.com/jenkins/develop
    - extra_index_url: https://pypi.python.org/simple
    - upgrade: true
    - reload_modules: true
    - order: last<commit_msg>Let's do it by hand.<commit_after>include:
  - pkgs.system.python-pip


{#- Ubuntu Lucid has way too old pip package, we'll need to upgrade "by hand", salt can't do it for us #}
{% if grains['os'] == 'Ubuntu' and grains['osrelease'].startswith('10.') %}
pip-cmd:
  cmd.run:
    - name: pip install --upgrade pip --install-option="--prefix=/usr"
    - reload_modules: true
    - require:
      - pkg: python-pip

uninstall-system-python-pip:
  cmd.run:
    - name: apt-get -q -y remove python-pip
    - require:
      - cmd: pip-cmd
{% endif %}

pip:
  pip.installed:
    {%- if salt['config.get']('virtualenv_name', None) %}
    - bin_env: /srv/virtualenvs/{{ salt['config.get']('virtualenv_name') }}
    {%- endif %}
    - index_url: https://pypi-jenkins.saltstack.com/jenkins/develop
    - extra_index_url: https://pypi.python.org/simple
    - upgrade: true
    - reload_modules: true
    - require:
      {%- if grains['os'] == 'Ubuntu' and grains['osrelease'].startswith('10.') %}
      - cmd: uninstall-system-python-pip
      {%- else %}
      - pkg: python-pip
      {%- endif %}
{'fraction_non_alphanumeric': 0.1763157894736842, 'fraction_numerical': 0.003157894736842105, 'mean_word_length': 2.802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '615155', 'n_tokens_mistral': 744, 'n_tokens_neox': 655, 'n_words': 147}