python-psycopg2.mk 923 B

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