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.

56 lines
1.5 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. PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/psycopg2
  13. PKG_HASH:=27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
  16. PKG_LICENSE:=LGPL-3.0-or-later
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_BUILD_DEPENDS:=python/host
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../python-package.mk
  21. define Package/python-psycopg2
  22. SUBMENU:=Python
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=PostgreSQL database adapter for Python
  26. URL:=http://initd.org/psycopg/
  27. DEPENDS:=+python +libpq +python-egenix-mx-base
  28. endef
  29. define Package/python-psycopg2/description
  30. Psycopg is the most popular PostgreSQL adapter for the Python programming language
  31. endef
  32. define Build/Compile
  33. # The PATH var is required so that psycopg2's setup.py script finds pg_config
  34. $(call Build/Compile/PyMod,., \
  35. install --prefix=/usr --root=$(PKG_INSTALL_DIR), \
  36. PATH=$(STAGING_DIR)/usr/bin:$(PATH))
  37. endef
  38. define Package/python-psycopg2/install
  39. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  40. $(CP) \
  41. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  42. $(1)$(PYTHON_PKG_DIR)
  43. endef
  44. $(eval $(call PyPackage,python-psycopg2))
  45. $(eval $(call BuildPackage,python-psycopg2))