mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-10 14:51:42 +00:00
pip: allow to drop a config file first
This commit is contained in:
parent
d90024f38e
commit
9aa8d59660
3 changed files with 26 additions and 0 deletions
6
packages/files/pip.conf
Normal file
6
packages/files/pip.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
{%- for section, settings in config.items()|sort -%}
|
||||
[{{ section }}]
|
||||
{%- for key, value in settings.items()|sort %}
|
||||
{{ key }} = {{ value }}
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
|
@ -6,12 +6,24 @@
|
|||
{% set req_pkgs = packages.pips.required.pkgs %}
|
||||
{% set wanted_pips = packages.pips.wanted %}
|
||||
{% set unwanted_pips = packages.pips.unwanted %}
|
||||
{% set pip_config = packages.pips.config %}
|
||||
|
||||
### REQ PKGS (without these, some of the WANTED PIPS will fail to install)
|
||||
pip_req_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs: {{ req_pkgs }}
|
||||
|
||||
{% if pip_config %}
|
||||
pip_config:
|
||||
file.managed:
|
||||
- name: /etc/pip.conf
|
||||
- source: salt://{{ slspath }}/files/pip.conf
|
||||
- template: jinja
|
||||
- makedirs: True
|
||||
- context:
|
||||
config: {{ pip_config|json }}
|
||||
{% endif %}
|
||||
|
||||
### PYTHON PKGS to install using PIP
|
||||
# (requires the python-pip deb/rpm installed, either by the system or listed in
|
||||
# the required packages
|
||||
|
@ -26,6 +38,9 @@ pip_req_pkgs:
|
|||
- sls: {{ dep }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if pip_config %}
|
||||
- file: pip_config
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for upn in unwanted_pips %}
|
||||
|
|
|
@ -31,6 +31,11 @@ packages:
|
|||
- campbel
|
||||
- reverse_geocode
|
||||
- indy-crypto
|
||||
config:
|
||||
global:
|
||||
timeout: 120
|
||||
default-timeout: 120
|
||||
proxy: http://proxy.example.com:3128
|
||||
gems:
|
||||
wanted:
|
||||
- progressbar
|
||||
|
|
Loading…
Add table
Reference in a new issue