summaryrefslogtreecommitdiff
path: root/lang/python/python-pyodbc
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2023-11-02 00:24:59 +0800
committerGitHub <noreply@github.com>2023-11-02 00:24:59 +0800
commit2d864d2a6bb1ee9c7c48bac72490e314ae84e42d (patch)
tree0aeb2756802bd04de6d7cca1e715c9653008bad6 /lang/python/python-pyodbc
parent58d8f9272139f29ec63f8fdde74a835fe031dece (diff)
parentd6d9763e31e0e81f8f1fe9fb63c1f9267391bfb0 (diff)
Merge pull request #22561 from jefferyto/pyodbc-5.0.1
pyodbc: Update to 5.0.1, rename source package, fix segmentation fault
Diffstat (limited to 'lang/python/python-pyodbc')
-rw-r--r--lang/python/python-pyodbc/Makefile42
-rw-r--r--lang/python/python-pyodbc/test.sh5
2 files changed, 47 insertions, 0 deletions
diff --git a/lang/python/python-pyodbc/Makefile b/lang/python/python-pyodbc/Makefile
new file mode 100644
index 000000000..6357d4bd6
--- /dev/null
+++ b/lang/python/python-pyodbc/Makefile
@@ -0,0 +1,42 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pyodbc
+PKG_VERSION:=5.0.1
+PKG_RELEASE:=1
+
+PYPI_NAME:=pyodbc
+PKG_HASH:=03d7d0b04d5a9156099ce8d03e92f3956783746fa9234eb6f5b5cfc12b645011
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+# for odbc_config
+PKG_BUILD_DEPENDS:=unixodbc/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyodbc
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=DB API module for ODBC
+ URL:=https://github.com/mkleehammer/pyodbc
+ DEPENDS:=+python3-light +python3-decimal +python3-uuid +libodbc +libstdcpp
+endef
+
+define Package/python3-pyodbc/description
+pyodbc is an open source Python module that makes accessing ODBC
+databases simple. It implements the DB API 2.0 specification but is
+packed with even more Pythonic convenience.
+endef
+
+$(eval $(call Py3Package,python3-pyodbc))
+$(eval $(call BuildPackage,python3-pyodbc))
+# no src package - the module does not contain any Python code
diff --git a/lang/python/python-pyodbc/test.sh b/lang/python/python-pyodbc/test.sh
new file mode 100644
index 000000000..f6cf04b11
--- /dev/null
+++ b/lang/python/python-pyodbc/test.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ "$1" = python3-pyodbc ] || exit 0
+
+python3 -c 'import pyodbc'