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.

72 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2007-2018 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-mysql
  9. PKG_VERSION:=1.3.12
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
  14. PKG_HASH:=2d9ec33de39f4d9c64ad7322ede0521d85829ce36a76f9dd3d6ab76a9c8648e5
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../python-package.mk
  18. include ../python3-package.mk
  19. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  20. # Help python-mysql find libiconv.so when using uClibc.
  21. ifneq ($(CONFIG_USE_UCLIBC),)
  22. TARGET_CPPFLAGS+= \
  23. -I$(STAGING_DIR)/usr/lib/libiconv-full/include
  24. TARGET_LDFLAGS += \
  25. -L$(STAGING_DIR)/usr/lib/libiconv-full/lib
  26. endif
  27. define Package/python-mysql/Default
  28. SUBMENU:=Python
  29. SECTION:=lang
  30. CATEGORY:=Languages
  31. URL:=https://pypi.python.org/project/mysqlclient
  32. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  33. endef
  34. define Package/python-mysql
  35. $(call Package/python-mysql/Default)
  36. TITLE:=MySQL database adapter for Python
  37. DEPENDS:=+PACKAGE_python-mysql:python +libmysqlclient
  38. VARIANT:=python
  39. endef
  40. define Package/python3-mysql
  41. $(call Package/python-mysql/Default)
  42. TITLE:=MySQL database adapter for Python3
  43. DEPENDS:=+PACKAGE_python3-mysql:python3 +libmysqlclient
  44. VARIANT:=python3
  45. endef
  46. define Package/python-mysql/description
  47. MySQLdb is an thread-compatible interface to the popular MySQL database
  48. server that provides the Python database API.
  49. endef
  50. define Package/python3-mysql/description
  51. $(call Package/python-mysql/description)
  52. .
  53. (Variant for Python3)
  54. endef
  55. $(eval $(call PyPackage,python-mysql))
  56. $(eval $(call BuildPackage,python-mysql))
  57. $(eval $(call Py3Package,python3-mysql))
  58. $(eval $(call BuildPackage,python3-mysql))