pyodbc: Update to 5.0.1, rename source package
authorJeffery To <jeffery.to@gmail.com>
Mon, 30 Oct 2023 12:02:46 +0000 (20:02 +0800)
committerJeffery To <jeffery.to@gmail.com>
Tue, 31 Oct 2023 04:31:26 +0000 (12:31 +0800)
This renames the source package to python-pyodbc to match other Python
packages.

This also updates the unixodbc dependency to libodbc, updates the
package title and description, and adds a test.sh script for the
packages feed CI.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/pyodbc/Makefile [deleted file]
lang/python/python-pyodbc/Makefile [new file with mode: 0644]
lang/python/python-pyodbc/test.sh [new file with mode: 0644]

diff --git a/lang/python/pyodbc/Makefile b/lang/python/pyodbc/Makefile
deleted file mode 100644 (file)
index 6c8fca8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.39
-PKG_RELEASE:=2
-
-PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=e528bb70dd6d6299ee429868925df0866e3e919c772b9eff79c8e17920d8f116
-
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE.txt
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-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:=python3-pyodbc
-  URL:=https://github.com/mkleehammer/pyodbc
-  DEPENDS:=+unixodbc +python3-light +python3-decimal +python3-uuid +libstdcpp
-endef
-
-define Package/python3-pyodbc/description
-DB API Module for ODBC
-
-A Python DB API 2 module for ODBC. This project provides an up-to-date,
-convenient interface to ODBC using native data types like datetime and decimal.
-endef
-
-$(eval $(call Py3Package,python3-pyodbc))
-$(eval $(call BuildPackage,python3-pyodbc))
diff --git a/lang/python/python-pyodbc/Makefile b/lang/python/python-pyodbc/Makefile
new file mode 100644 (file)
index 0000000..6357d4b
--- /dev/null
@@ -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 (file)
index 0000000..f6cf04b
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ "$1" = python3-pyodbc ] || exit 0
+
+python3 -c 'import pyodbc'