Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2 recipe fixes and doc, fixes #1405 #1629

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions ci/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions pythonforandroid/recipes/psycopg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes:

fatal error: crypt.h: No such file or directory


def prebuild_arch(self, arch):
libdir = self.ctx.get_libs_dir(arch.arch)
Expand Down