Browse Source

python-mysql: import version 1.2.5 of the MySQL-python package

Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
Tested-by: Gergely Kiss <mail.gery@gmail.com>
Gergely Kiss 10 years ago
parent
commit
b35330fd8f
2 changed files with 61 additions and 0 deletions
  1. 50
    0
      lang/python-mysql/Makefile
  2. 11
    0
      lang/python-mysql/patches/010-threadsafe.patch

+ 50
- 0
lang/python-mysql/Makefile View File

@@ -0,0 +1,50 @@
1
+#
2
+# Copyright (C) 2007-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=MySQL-python
11
+PKG_VERSION:=1.2.5
12
+PKG_RELEASE:=1
13
+PKG_LICENSE:=GPL-2.0
14
+
15
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
16
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/M/MySQL-python/
17
+PKG_MD5SUM:=654f75b302db6ed8dc5a898c625e030c
18
+
19
+PKG_BUILD_DEPENDS:=python python-setuptools libmysqlclient
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+$(call include_mk, python-package.mk)
23
+
24
+define Package/python-mysql
25
+  SUBMENU:=Python
26
+  SECTION:=lang
27
+  CATEGORY:=Languages
28
+  TITLE:=MySQL database adapter for Python
29
+  URL:=https://pypi.python.org/pypi/MySQL-python
30
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
31
+  DEPENDS:=+python +libmysqlclient
32
+endef
33
+
34
+define Package/python-mysql/description
35
+ MySQLdb is an thread-compatible interface to the popular MySQL database
36
+ server that provides the Python database API.
37
+endef
38
+
39
+define Build/Compile
40
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
41
+endef
42
+
43
+define Package/python-mysql/install
44
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
45
+	$(CP) \
46
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
47
+	    $(1)$(PYTHON_PKG_DIR)
48
+endef
49
+
50
+$(eval $(call BuildPackage,python-mysql))

+ 11
- 0
lang/python-mysql/patches/010-threadsafe.patch View File

@@ -0,0 +1,11 @@
1
+--- MySQL-python-1.2.2/site_orig.cfg	2007-08-15 12:58:40.000000000 +0200
2
++++ MySQL-python-1.2.2/site.cfg	2007-08-15 12:58:49.000000000 +0200
3
+@@ -4,7 +4,7 @@
4
+ # static: link against a static library (probably required for embedded)
5
+ 
6
+ embedded = False
7
+-threadsafe = True
8
++threadsafe = False
9
+ static = False
10
+ 
11
+ # The path to mysql_config.