You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-psycopg2
  9. PKG_VERSION:=2.7.6.1
  10. PKG_RELEASE:=2
  11. PYPI_NAME:=psycopg2
  12. PKG_HASH:=27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82
  13. PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
  14. PKG_LICENSE:=LGPL-3.0-or-later
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_BUILD_DEPENDS:=python/host
  17. include ../pypi.mk
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python-package.mk
  20. define Package/python-psycopg2
  21. SUBMENU:=Python
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=PostgreSQL database adapter for Python
  25. URL:=http://initd.org/psycopg/
  26. DEPENDS:=+python +libpq +python-egenix-mx-base
  27. endef
  28. define Package/python-psycopg2/description
  29. Psycopg is the most popular PostgreSQL adapter for the Python programming language
  30. endef
  31. define Build/Compile
  32. # The PATH var is required so that psycopg2's setup.py script finds pg_config
  33. $(call Build/Compile/PyMod,., \
  34. install --prefix=/usr --root=$(PKG_INSTALL_DIR), \
  35. PATH=$(STAGING_DIR)/usr/bin:$(PATH))
  36. endef
  37. define Package/python-psycopg2/install
  38. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  39. $(CP) \
  40. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  41. $(1)$(PYTHON_PKG_DIR)
  42. endef
  43. $(eval $(call PyPackage,python-psycopg2))
  44. $(eval $(call BuildPackage,python-psycopg2))