Browse Source

Salt: Add psycopg2 compile dependencies

Starting with psycopg2 version 2.8, the package on pypi no longer
contains a binary version and must be compiled from source. These two
packages are required for this to be possible.

It would have been simpler to just switch to the psycopg2-binary
package, however that isn't a very good solution overall since many
other packages treat "psycopg2" as the dependency that they want
installed, not "psycopg2-binary". Overall, this situation is pretty
messy and I'm not sure what will end up being the final state, but this
should work for now.

More info about the source-only change:
http://initd.org/psycopg/articles/2018/02/08/psycopg-274-released/
merge-requests/68/head
Deimos 6 years ago
parent
commit
2282bd25ab
  1. 9
      salt/salt/python.sls

9
salt/salt/python.sls

@ -22,13 +22,20 @@ venv-setup:
- require: - require:
- pkg: python{{ python_version }}-venv - pkg: python{{ python_version }}-venv
# Packages needed to be able to compile psycopg2 (while installing requirements.txt)
psycopg2-deps:
pkg.installed:
- pkgs:
- libpq-dev
- python{{ python_version }}-dev
pip-installs: pip-installs:
pip.installed: pip.installed:
- requirements: {{ app_dir }}/requirements.txt - requirements: {{ app_dir }}/requirements.txt
- bin_env: {{ venv_dir }} - bin_env: {{ venv_dir }}
require: require:
- cmd: venv-setup - cmd: venv-setup
- pkg: pip-deps
- pkg: psycopg2-deps
self-install: self-install:
pip.installed: pip.installed:

Loading…
Cancel
Save