summaryrefslogtreecommitdiff
path: root/lang/python/pyodbc
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-08-26 09:49:49 -0700
committerRosen Penev <rosenp@gmail.com>2018-09-17 18:29:45 -0700
commite94371b338793454e1577e01e664989a9724f887 (patch)
tree64d413419fdfb3b07cea3e02463d0e94993b3731 /lang/python/pyodbc
parent945b0d46adc064f510290de37d2e4956b0f9d723 (diff)
pyodbc: Update to 4.0.24
Fixes compilation on buildbots. Removed upstreamed patch. Changed URL to a sensical one. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'lang/python/pyodbc')
-rw-r--r--lang/python/pyodbc/Makefile6
-rw-r--r--lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch59
2 files changed, 3 insertions, 62 deletions
diff --git a/lang/python/pyodbc/Makefile b/lang/python/pyodbc/Makefile
index aec3e7e63..dc0760d9a 100644
--- a/lang/python/pyodbc/Makefile
+++ b/lang/python/pyodbc/Makefile
@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.21
+PKG_VERSION:=4.0.24
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0f/04/c5638a4636fb8117fdc45685f489864459d193b1d892b61dce785ddf58f9
-PKG_HASH:=9655f84ca9e5cb2dfffff705601017420c840d55271ba62dd44f05383eff0329
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyodbc
+PKG_HASH:=4326abb737dec36156998d52324921673d30f575e1e0998f0c5edd7de20e61d4
PKG_BUILD_DEPENDS:=python python3 unixodbc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
diff --git a/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch b/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch
deleted file mode 100644
index 0819a6dde..000000000
--- a/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- a/src/connection.cpp
-+++ b/src/connection.cpp
-@@ -18,6 +18,14 @@
- #include "cnxninfo.h"
- #include "sqlwchar.h"
-
-+#ifdef WORDS_BIGENDIAN
-+# define OPTENC_UTF16NE OPTENC_UTF16BE
-+# define ENCSTR_UTF16NE "utf-16be"
-+#else
-+# define OPTENC_UTF16NE OPTENC_UTF16LE
-+# define ENCSTR_UTF16NE "utf-16le"
-+#endif
-+
- #if PY_MAJOR_VERSION < 3
- static bool IsStringType(PyObject* t) { return (void*)t == (void*)&PyString_Type; }
- static bool IsUnicodeType(PyObject* t) { return (void*)t == (void*)&PyUnicode_Type; }
-@@ -90,7 +98,7 @@ static bool Connect(PyObject* pConnectSt
- // indication that we can handle Unicode. We are going to use the same unicode ending
- // as we do for binding parameters.
-
-- SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, "utf-16le");
-+ SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, ENCSTR_UTF16NE);
- if (!wchar)
- return false;
-
-@@ -216,24 +224,24 @@ PyObject* Connection_New(PyObject* pConn
- // single-byte text we don't actually know what the encoding is. For example, with SQL
- // Server the encoding is based on the database's collation. We ask the driver / DB to
- // convert to SQL_C_WCHAR and use the ODBC default of UTF-16LE.
-- cnxn->sqlchar_enc.optenc = OPTENC_UTF16LE;
-- cnxn->sqlchar_enc.name = _strdup("utf-16le");
-+ cnxn->sqlchar_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->sqlchar_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->sqlchar_enc.ctype = SQL_C_WCHAR;
-
-- cnxn->sqlwchar_enc.optenc = OPTENC_UTF16LE;
-- cnxn->sqlwchar_enc.name = _strdup("utf-16le");
-+ cnxn->sqlwchar_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->sqlwchar_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->sqlwchar_enc.ctype = SQL_C_WCHAR;
-
-- cnxn->metadata_enc.optenc = OPTENC_UTF16LE;
-- cnxn->metadata_enc.name = _strdup("utf-16le");
-+ cnxn->metadata_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->metadata_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->metadata_enc.ctype = SQL_C_WCHAR;
-
- // Note: I attempted to use UTF-8 here too since it can hold any type, but SQL Server fails
- // with a data truncation error if we send something encoded in 2 bytes to a column with 1
- // character. I don't know if this is a bug in SQL Server's driver or if I'm missing
- // something, so we'll stay with the default ODBC conversions.
-- cnxn->unicode_enc.optenc = OPTENC_UTF16LE;
-- cnxn->unicode_enc.name = _strdup("utf-16le");
-+ cnxn->unicode_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->unicode_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->unicode_enc.ctype = SQL_C_WCHAR;
-
- #if PY_MAJOR_VERSION < 3