summaryrefslogtreecommitdiff
path: root/lang/python/python-mysql
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/python-mysql')
-rw-r--r--lang/python/python-mysql/Makefile54
-rw-r--r--lang/python/python-mysql/patches/010-threadsafe.patch11
2 files changed, 35 insertions, 30 deletions
diff --git a/lang/python/python-mysql/Makefile b/lang/python/python-mysql/Makefile
index f776b74bb..5de2e1ecc 100644
--- a/lang/python/python-mysql/Makefile
+++ b/lang/python/python-mysql/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -7,26 +7,43 @@
include $(TOPDIR)/rules.mk
-PKG_NAME:=MySQL-python
-PKG_VERSION:=1.2.5
+PKG_NAME:=python-mysql
+PKG_VERSION:=1.3.12
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/M/MySQL-python/
-PKG_HASH:=811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74
+PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/$(PKG_NAME)
+PKG_HASH:=2d9ec33de39f4d9c64ad7322ede0521d85829ce36a76f9dd3d6ab76a9c8648e5
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-mysql
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-mysql/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- TITLE:=MySQL database adapter for Python
- URL:=https://pypi.python.org/pypi/MySQL-python
+ URL:=https://pypi.python.org/project/mysqlclient
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- DEPENDS:=+python +libmysqlclient
+endef
+
+define Package/python-mysql
+ $(call Package/python-mysql/Default)
+ TITLE:=MySQL database adapter for Python
+ DEPENDS:=+PACKAGE_python-mysql:python +libmysqlclient
+ VARIANT:=python
+endef
+
+define Package/python3-mysql
+ $(call Package/python-mysql/Default)
+ TITLE:=MySQL database adapter for Python3
+ DEPENDS:=+PACKAGE_python3-mysql:python3 +libmysqlclient
+ VARIANT:=python3
endef
define Package/python-mysql/description
@@ -34,15 +51,14 @@ define Package/python-mysql/description
server that provides the Python database API.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/python-mysql/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-mysql/description
+$(call Package/python-mysql/description)
+.
+(Variant for Python3)
endef
+$(eval $(call PyPackage,python-mysql))
$(eval $(call BuildPackage,python-mysql))
+
+$(eval $(call Py3Package,python3-mysql))
+$(eval $(call BuildPackage,python3-mysql))
diff --git a/lang/python/python-mysql/patches/010-threadsafe.patch b/lang/python/python-mysql/patches/010-threadsafe.patch
deleted file mode 100644
index bcd9af8d6..000000000
--- a/lang/python/python-mysql/patches/010-threadsafe.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- MySQL-python-1.2.2/site_orig.cfg 2007-08-15 12:58:40.000000000 +0200
-+++ MySQL-python-1.2.2/site.cfg 2007-08-15 12:58:49.000000000 +0200
-@@ -4,7 +4,7 @@
- # static: link against a static library (probably required for embedded)
-
- embedded = False
--threadsafe = True
-+threadsafe = False
- static = False
-
- # The path to mysql_config.