Skip to content

Commit

Permalink
Appveyor ODBC driver updates
Browse files Browse the repository at this point in the history
SQL Server drivers needed updating. Postgres drivers have moved. MySQL now separates 32-bit and 64-bit drivers - up to v8.0 are 32-bit, v8.1 and above are 64-bit.
  • Loading branch information
keitherskine committed Sep 10, 2024
1 parent 5c37efc commit b397b8e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
24 changes: 12 additions & 12 deletions appveyor/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,21 @@ CheckAndInstallMsiFromUrl `
-driver_name "ODBC Driver 13 for SQL Server" `
-driver_bitness "64-bit" `
-driver_url "https://download.microsoft.com/download/D/5/E/D5EEF288-A277-45C8-855B-8E2CB7E25B96/x64/msodbcsql.msi" `
-msifile_path "$cache_dir\msodbcsql_13.1.0.0_x64.msi" `
-msifile_path "$cache_dir\msodbcsql_13_E25B96_x64.msi" `
-msiexec_paras @("IACCEPTMSODBCSQLLICENSETERMS=YES", "ADDLOCAL=ALL");

CheckAndInstallMsiFromUrl `
-driver_name "ODBC Driver 17 for SQL Server" `
-driver_bitness "64-bit" `
-driver_url "https://download.microsoft.com/download/6/f/f/6ffefc73-39ab-4cc0-bb7c-4093d64c2669/en-US/17.10.4.1/x64/msodbcsql.msi" `
-msifile_path "$cache_dir\msodbcsql_17.10.4.1_x64.msi" `
-driver_url "https://download.microsoft.com/download/6/f/f/6ffefc73-39ab-4cc0-bb7c-4093d64c2669/en-US/17.10.6.1/x64/msodbcsql.msi" `
-msifile_path "$cache_dir\msodbcsql_17.10.6.1_x64.msi" `
-msiexec_paras @("IACCEPTMSODBCSQLLICENSETERMS=YES", "ADDLOCAL=ALL");

CheckAndInstallMsiFromUrl `
-driver_name "ODBC Driver 18 for SQL Server" `
-driver_bitness "64-bit" `
-driver_url "https://download.microsoft.com/download/4/f/e/4fed6f4b-dc42-4255-b4b4-70f8e2a35a63/en-US/18.3.1.1/x64/msodbcsql.msi" `
-msifile_path "$cache_dir\msodbcsql_18.3.1.1_x64.msi" `
-driver_url "https://download.microsoft.com/download/1/7/4/17423b83-b75d-42e1-b5b9-eaa266561c5e/Windows/amd64/1033/msodbcsql.msi" `
-msifile_path "$cache_dir\msodbcsql_18_561c5e_x64.msi" `
-msiexec_paras @("IACCEPTMSODBCSQLLICENSETERMS=YES", "ADDLOCAL=ALL");

# some drivers must be installed in alignment with Python's bitness
Expand All @@ -189,32 +189,32 @@ if ($python_arch -eq "64") {
CheckAndInstallZippedMsiFromUrl `
-driver_name "PostgreSQL Unicode(x64)" `
-driver_bitness "64-bit" `
-driver_url "https://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc_11_01_0000-x64.zip" `
-driver_url "https://ftp.postgresql.org/pub/odbc/versions.old/msi/psqlodbc_11_01_0000-x64.zip" `
-zipfile_path "$temp_dir\psqlodbc_11_01_0000-x64.zip" `
-zip_internal_msi_file "psqlodbc_x64.msi" `
-msifile_path "$cache_dir\psqlodbc_11_01_0000-x64.msi";

CheckAndInstallMsiFromUrl `
-driver_name "MySQL ODBC 8.0 ANSI Driver" `
-driver_name "MySQL ODBC 8.4 ANSI Driver" `
-driver_bitness "64-bit" `
-driver_url "https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.33-winx64.msi" `
-msifile_path "$cache_dir\mysql-connector-odbc-8.0.33-winx64.msi";
-driver_url "https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.4.0-winx64.msi" `
-msifile_path "$cache_dir\mysql-connector-odbc-8.4.0-winx64.msi";

} elseif ($python_arch -eq "32") {

CheckAndInstallZippedMsiFromUrl `
-driver_name "PostgreSQL Unicode" `
-driver_bitness "32-bit" `
-driver_url "https://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc_11_01_0000-x86.zip" `
-driver_url "https://ftp.postgresql.org/pub/odbc/versions.old/msi/psqlodbc_11_01_0000-x86.zip" `
-zipfile_path "$temp_dir\psqlodbc_11_01_0000-x86.zip" `
-zip_internal_msi_file "psqlodbc_x86.msi" `
-msifile_path "$cache_dir\psqlodbc_11_01_0000-x86.msi";

CheckAndInstallMsiFromUrl `
-driver_name "MySQL ODBC 8.0 ANSI Driver" `
-driver_bitness "32-bit" `
-driver_url "https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.33-win32.msi" `
-msifile_path "$cache_dir\mysql-connector-odbc-8.0.33-win32.msi";
-driver_url "https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.37-win32.msi" `
-msifile_path "$cache_dir\mysql-connector-odbc-8.0.37-win32.msi";

} else {
Write-Output "ERROR: Unexpected Python architecture:"
Expand Down
6 changes: 5 additions & 1 deletion appveyor/test_script.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ ECHO *** Get MySQL version
"%MYSQL_PATH%\bin\mysql" -u root -pPassword12! -e "STATUS"

:mysql1
SET DRIVER={MySQL ODBC 8.0 ANSI Driver}
IF %PYTHON_ARCH% EQU 32 (
SET DRIVER={MySQL ODBC 8.0 ANSI Driver}
) ELSE (
SET DRIVER={MySQL ODBC 8.4 ANSI Driver}
)
SET PYODBC_MYSQL=Driver=%DRIVER%;Charset=utf8mb4;Server=localhost;Port=3306;Database=mysql;Uid=root;Pwd=Password12!;
ECHO.
ECHO *** Run tests using driver: "%DRIVER%"
Expand Down

0 comments on commit b397b8e

Please sign in to comment.