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.

66 lines
1.8 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.13
  10. PKG_RELEASE:=1
  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:=ff8ee1be84215e6c30a746b728c41eb0701a46ca76e343af445b35ce6250644f
  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. # python-mysql needs iconv
  20. include $(INCLUDE_DIR)/nls.mk
  21. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  22. define Package/python-mysql/Default
  23. SUBMENU:=Python
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. URL:=https://pypi.python.org/project/mysqlclient
  27. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  28. endef
  29. define Package/python-mysql
  30. $(call Package/python-mysql/Default)
  31. TITLE:=MySQL database adapter for Python
  32. DEPENDS:=+PACKAGE_python-mysql:python +libmysqlclient
  33. VARIANT:=python
  34. endef
  35. define Package/python3-mysql
  36. $(call Package/python-mysql/Default)
  37. TITLE:=MySQL database adapter for Python3
  38. DEPENDS:=+PACKAGE_python3-mysql:python3 +libmysqlclient
  39. VARIANT:=python3
  40. endef
  41. define Package/python-mysql/description
  42. MySQLdb is an thread-compatible interface to the popular MySQL database
  43. server that provides the Python database API.
  44. endef
  45. define Package/python3-mysql/description
  46. $(call Package/python-mysql/description)
  47. .
  48. (Variant for Python3)
  49. endef
  50. $(eval $(call PyPackage,python-mysql))
  51. $(eval $(call BuildPackage,python-mysql))
  52. $(eval $(call Py3Package,python3-mysql))
  53. $(eval $(call BuildPackage,python3-mysql))