From 2282bd25aba3a533c2de40497357de9b0773c876 Mon Sep 17 00:00:00 2001 From: Deimos Date: Sun, 14 Apr 2019 22:30:46 -0600 Subject: [PATCH] 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/ --- salt/salt/python.sls | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/salt/salt/python.sls b/salt/salt/python.sls index f449fbd..76cb8e4 100644 --- a/salt/salt/python.sls +++ b/salt/salt/python.sls @@ -22,13 +22,20 @@ venv-setup: - require: - 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.installed: - requirements: {{ app_dir }}/requirements.txt - bin_env: {{ venv_dir }} require: - cmd: venv-setup - - pkg: pip-deps + - pkg: psycopg2-deps self-install: pip.installed: