From 9465952006a73049b6165a9abfa6a7e77c8d29a6 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Wed, 30 Jan 2019 11:26:37 +0100 Subject: [PATCH] psycopg2 recipe fixes and doc, fixes #1405 Also replaced BROKEN_RECIPES_PYTHON3_CRYSTAX by BROKEN_RECIPES_PYTHON3 since our CI doesn't support Crystax anymore. --- ci/constants.py | 12 ++++-------- pythonforandroid/recipes/psycopg2/__init__.py | 4 ++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/constants.py b/ci/constants.py index d4ed5a672d..8a1f852fbc 100644 --- a/ci/constants.py +++ b/ci/constants.py @@ -45,7 +45,7 @@ class TargetPython(Enum): 'doubleratchet', 'omemo', 'cryptography', - # https://github.com/kivy/python-for-android/issues/1405 + # requires `libpq-dev` system dependency e.g. for `pg_config` binary 'psycopg2', 'pygame', # most likely some setup in the Docker container, because it works in host @@ -63,7 +63,7 @@ class TargetPython(Enum): 'zeroconf', 'zope', ]) -BROKEN_RECIPES_PYTHON3_CRYSTAX = set([ +BROKEN_RECIPES_PYTHON3 = set([ 'brokenrecipe', # enum34 is not compatible with Python 3.6 standard library # https://stackoverflow.com/a/45716067/185510 @@ -83,8 +83,8 @@ class TargetPython(Enum): 'icu', # https://github.com/kivy/python-for-android/issues/1354 'kivent_core', 'kivent_cymunk', 'kivent_particles', 'kivent_polygen', - # https://github.com/kivy/python-for-android/issues/1405 - 'libpq', 'psycopg2', + # requires `libpq-dev` system dependency e.g. for `pg_config` binary + 'psycopg2', 'netifaces', # https://github.com/kivy/python-for-android/issues/1315 ? 'opencv', @@ -97,13 +97,9 @@ class TargetPython(Enum): 'sympy', 'vlc', ]) -# to be created via https://github.com/kivy/python-for-android/issues/1514 -BROKEN_RECIPES_PYTHON3 = set([ -]) BROKEN_RECIPES = { TargetPython.python2: BROKEN_RECIPES_PYTHON2, - TargetPython.python3crystax: BROKEN_RECIPES_PYTHON3_CRYSTAX, TargetPython.python3: BROKEN_RECIPES_PYTHON3, } # recipes that were already built will be skipped diff --git a/pythonforandroid/recipes/psycopg2/__init__.py b/pythonforandroid/recipes/psycopg2/__init__.py index 981e689868..75a07374e5 100644 --- a/pythonforandroid/recipes/psycopg2/__init__.py +++ b/pythonforandroid/recipes/psycopg2/__init__.py @@ -4,10 +4,14 @@ class Psycopg2Recipe(PythonRecipe): + """ + Requires `libpq-dev` system dependency e.g. for `pg_config` binary. + """ version = 'latest' url = 'http://initd.org/psycopg/tarballs/psycopg2-{version}.tar.gz' depends = ['libpq'] site_packages_name = 'psycopg2' + call_hostpython_via_targetpython = False def prebuild_arch(self, arch): libdir = self.ctx.get_libs_dir(arch.arch)