Skip to content

Commit cf4936c

Browse files
committed
Correct README and Update unsupported architecture ImportError
1 parent 98c519b commit cf4936c

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

mssql_python/ddbc_bindings.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
# On macOS, prioritize universal2 binary regardless of the local architecture
1313
if platform_name == 'darwin':
1414
architecture = "universal2"
15-
elif architecture in ('amd64', 'x86_64', 'x64'):
16-
architecture = "amd64" if platform_name == 'win32' else "x86_64"
17-
elif architecture in ('arm64', 'aarch64'):
18-
architecture = "arm64"
15+
elif platform_name == 'win32':
16+
if architecture in ('amd64', 'x86_64', 'x64'):
17+
architecture = "amd64" if platform_name == 'win32' else "x86_64"
18+
elif architecture in ('arm64', 'aarch64'):
19+
architecture = "arm64"
20+
else:
21+
raise ImportError(f"Unsupported architecture for mssql-python: {platform_name}-{architecture}")
1922
else:
20-
raise ImportError(f"Unsupported architecture for mssql-python: {architecture}")
23+
raise ImportError(f"Unsupported architecture for mssql-python: {platform_name}-{architecture}")
2124

2225
# Determine extension based on platform
2326
if platform_name == 'win32':

mssql_python/pybind/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ This README provides instructions to build the DDBC Bindings PYD for your system
5858
- Detect system architecture (only `arm64` is supported for MacOS)
5959
- Configure CMake with appropriate include/library paths
6060
- Compile `ddbc_bindings_mac.cpp` using CMake
61-
- Generate the `.so` file (e.g., `ddbc_bindings.cp313-arm64.so`)
61+
- Generate the `.so` file (e.g., `ddbc_bindings.cp313-universal2.so`)
6262
- Copy the output SO file to the parent `mssql_python` directory

0 commit comments

Comments
 (0)