1################################################################################
2#
3# python-psycopg2
4#
5################################################################################
6
7PYTHON_PSYCOPG2_VERSION = 2.9.9
8PYTHON_PSYCOPG2_SOURCE = psycopg2-$(PYTHON_PSYCOPG2_VERSION).tar.gz
9PYTHON_PSYCOPG2_SITE = https://files.pythonhosted.org/packages/c9/5e/dc6acaf46d78979d6b03458b7a1618a68e152a6776fce95daac5e0f0301b
10PYTHON_PSYCOPG2_SETUP_TYPE = setuptools
11PYTHON_PSYCOPG2_LICENSE = LGPL-3.0+
12PYTHON_PSYCOPG2_LICENSE_FILES = LICENSE
13PYTHON_PSYCOPG2_DEPENDENCIES = postgresql
14
15# Force psycopg2 to use the Buildroot provided postgresql version
16# instead of the one from the host machine
17define PYTHON_PSYCOPG2_CREATE_SETUP_CFG
18	printf "[build_ext]\ndefine=\npg_config=$(STAGING_DIR)/usr/bin/pg_config\n" > $(@D)/setup.cfg
19endef
20PYTHON_PSYCOPG2_PRE_CONFIGURE_HOOKS += PYTHON_PSYCOPG2_CREATE_SETUP_CFG
21
22$(eval $(python-package))
23