diff --git a/salt/salt/boussole.service.jinja2 b/salt/salt/boussole.service.jinja2 index 96132ea..85c35ae 100644 --- a/salt/salt/boussole.service.jinja2 +++ b/salt/salt/boussole.service.jinja2 @@ -1,11 +1,11 @@ -{% from 'common.jinja2' import app_dir, bin_dir -%} +{% from 'common.jinja2' import app_dir -%} [Unit] Description=Boussole - auto-compile SCSS files on change [Service] WorkingDirectory={{ app_dir }} Environment="LC_ALL=C.UTF-8" "LANG=C.UTF-8" -ExecStart={{ bin_dir }}/boussole watch --backend=yaml --config=boussole.yaml --poll +ExecStart=/opt/venvs/boussole/bin/boussole watch --backend=yaml --config=boussole.yaml --poll Restart=always RestartSec=5 diff --git a/salt/salt/boussole.sls b/salt/salt/boussole.sls index 28d7c69..b10ee0c 100644 --- a/salt/salt/boussole.sls +++ b/salt/salt/boussole.sls @@ -1,4 +1,20 @@ -{% from 'common.jinja2' import app_dir, bin_dir %} +{% from 'common.jinja2' import app_dir, python_version %} + +{% set boussole_venv_dir = '/opt/venvs/boussole' %} + +# Salt seems to use the deprecated pyvenv script, manual for now +boussole-venv-setup: + cmd.run: + - name: /usr/local/pyenv/versions/{{ python_version }}/bin/python -m venv {{ boussole_venv_dir }} + - creates: {{ boussole_venv_dir }} + - require: + - pkg: python3-venv + - pyenv: {{ python_version }} + +boussole-pip-installs: + cmd.run: + - name: {{ boussole_venv_dir }}/bin/pip install boussole + - unless: ls {{ boussole_venv_dir }}/lib/python3.6/site-packages/boussole /etc/systemd/system/boussole.service: file.managed: @@ -22,7 +38,7 @@ create-css-directory: initial-boussole-run: cmd.run: - - name: {{ bin_dir }}/boussole compile --backend=yaml --config=boussole.yaml + - name: {{ boussole_venv_dir }}/bin/boussole compile --backend=yaml --config=boussole.yaml - cwd: {{ app_dir }} - env: - LC_ALL: C.UTF-8 diff --git a/tildes/requirements-to-freeze.txt b/tildes/requirements-to-freeze.txt index 5c14cb1..0de8f97 100644 --- a/tildes/requirements-to-freeze.txt +++ b/tildes/requirements-to-freeze.txt @@ -4,8 +4,7 @@ amqpy argon2_cffi astroid==1.5.3 # pylama has issues with pylint 1.8.1 bleach -boussole -click==5.1 # boussole needs < 6.0 +click cornice freezegun gunicorn @@ -29,6 +28,7 @@ pyramid-tm pyramid-webassets pytest pytest-mock +PyYAML # needs to be installed separately for webassets SQLAlchemy SQLAlchemy-Utils stripe diff --git a/tildes/requirements.txt b/tildes/requirements.txt index 00a77a2..7cb061f 100644 --- a/tildes/requirements.txt +++ b/tildes/requirements.txt @@ -1,7 +1,6 @@ ago==0.0.92 alembic==1.0.0 amqpy==0.13.1 -argh==0.26.2 argon2-cffi==18.1.0 astroid==1.5.3 atomicwrites==1.1.5 @@ -9,13 +8,10 @@ attrs==18.1.0 backcall==0.1.0 beautifulsoup4==4.6.3 bleach==2.1.3 -boussole==1.2.3 certifi==2018.4.16 cffi==1.11.5 chardet==3.0.4 -click==5.1 -colorama==0.3.9 -colorlog==3.1.4 +click==6.7 cornice==3.4.0 decorator==4.3.0 freezegun==0.3.10 @@ -29,7 +25,6 @@ isort==4.3.4 jedi==0.12.1 Jinja2==2.10 lazy-object-proxy==1.3.1 -libsass==0.14.5 Mako==1.0.7 MarkupSafe==1.0 marshmallow==2.15.4 @@ -39,7 +34,6 @@ mypy==0.620 mypy-extensions==0.3.0 parso==0.3.1 PasteDeploy==1.5.2 -pathtools==0.1.2 pexpect==4.6.0 pickleshare==0.7.4 plaster==1.0 @@ -51,7 +45,6 @@ psycopg2==2.7.5 ptyprocess==0.6.0 publicsuffix2==2.20160818 py==1.5.4 -pyaml==17.12.1 pycodestyle==2.4.0 pycparser==2.18 pydocstyle==2.1.1 @@ -92,7 +85,6 @@ typed-ast==1.1.0 urllib3==1.23 venusian==1.1.0 waitress==1.1.0 -watchdog==0.8.3 wcwidth==0.1.7 webargs==4.0.0 webassets==0.12.1