Skip to content

Commit

Permalink
Fixes psycopg2 lib install dir, closes #1711
Browse files Browse the repository at this point in the history
Also note this recipe seems to depend on `nl_langinfo` which is only
available from ANDROID_API 26.
  • Loading branch information
AndreMiras committed Feb 20, 2019
1 parent 6ca419e commit 6d2479c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pythonforandroid/recipes/psycopg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
class Psycopg2Recipe(PythonRecipe):
"""
Requires `libpq-dev` system dependency e.g. for `pg_config` binary.
If you get `nl_langinfo` symbol runtime error, make sure you're running on
`ANDROID_API` (`ndk-api`) >= 26, see:
https://github.com/kivy/python-for-android/issues/1711#issuecomment-465747557
"""
version = 'latest'
url = 'http://initd.org/psycopg/tarballs/psycopg2-{version}.tar.gz'
Expand Down Expand Up @@ -41,7 +44,7 @@ def install_python_package(self, arch, name=None, env=None, is_dir=True):
_env=env)
shprint(hostpython, 'setup.py', 'install', '-O2',
'--root={}'.format(self.ctx.get_python_install_dir()),
'--install-lib=lib/python2.7/site-packages', _env=env)
'--install-lib=.', _env=env)


recipe = Psycopg2Recipe()

0 comments on commit 6d2479c

Please sign in to comment.