Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@ dnf install -y libtool-ltdl krb5-libs
# For SUSE
zypper install -y libltdl7 libkrb5-3 libgssapi-krb5-2

# For SUSE/openSUSE
zypper install -y libltdl7

pip install mssql-python
```

## Key Features
### Supported Platforms

Windows, MacOS and Linux (manylinux - Debian, Ubuntu, RHEL & musllinux - Alpine)
Windows, MacOS and Linux (manylinux - Debian, Ubuntu, RHEL, SUSE (x64 only) & musllinux - Alpine)

> **Note:**
> Support for additional Linux OSs (SUSE Linux) will come soon
>
> SUSE Linux ARM64 is not supported by Microsoft ODBC Driver. Use x64 architecture for SUSE deployments.

### DBAPI v2.0 Compliance

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 20 additions & 1 deletion mssql_python/pybind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ mssql_python/
│ ├── debian_ubuntu/
│ │ ├── x86_64/lib/
│ │ └── arm64/lib/
│ └── rhel/
│ ├── rhel/
│ │ ├── x86_64/lib/
│ │ └── arm64/lib/
│ ├── suse/
│ │ └── x86_64/lib/ # ARM64 not supported by Microsoft
│ └── alpine/
│ ├── x86_64/lib/
│ └── arm64/lib/
└── ddbc_bindings.cp{python_version}-{architecture}.{extension}
Expand Down Expand Up @@ -152,6 +157,20 @@ Linux builds support multiple distributions:
- `libmsodbcsql-18.5.so.1.1` - Main driver
- `libodbcinst.so.2` - Installer library

**SUSE/openSUSE x86_64:**
- `libmsodbcsql-18.5.so.1.1` - Main driver
- `libodbcinst.so.2` - Installer library

> **Note:** SUSE/openSUSE ARM64 is not supported by Microsoft ODBC Driver 18

**Alpine x86_64:**
- `libmsodbcsql-18.5.so.1.1` - Main driver
- `libodbcinst.so.2` - Installer library

**Alpine ARM64:**
- `libmsodbcsql-18.5.so.1.1` - Main driver
- `libodbcinst.so.2` - Installer library

## **Python Extension Modules**
Your build system generates architecture-specific Python extension modules:

Expand Down
4 changes: 3 additions & 1 deletion mssql_python/pybind/ddbc_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,10 @@ std::string GetDriverPathCpp(const std::string& moduleDir) {
platform = "alpine";
} else if (fs::exists("/etc/redhat-release") || fs::exists("/etc/centos-release")) {
platform = "rhel";
} else if (fs::exists("/etc/SuSE-release") || fs::exists("/etc/SUSE-brand")) {
platform = "suse";
} else {
platform = "debian_ubuntu";
platform = "debian_ubuntu"; // Default to debian_ubuntu for other distros
}

fs::path driverPath = basePath / "libs" / "linux" / platform / arch / "lib" / "libmsodbcsql-18.5.so.1.1";
Expand Down
6 changes: 5 additions & 1 deletion tests/test_000_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ def _detect_linux_distro(self):
platform = "alpine";
} else if (fs::exists("/etc/redhat-release") || fs::exists("/etc/centos-release")) {
platform = "rhel";
} else if (fs::exists("/etc/SuSE-release") || fs::exists("/etc/SUSE-brand")) {
platform = "suse";
} else {
platform = "ubuntu";
platform = "debian_ubuntu";
}

fs::path driverPath = basePath / "libs" / "linux" / platform / arch / "lib" / "libmsodbcsql-18.5.so.1.1";
Expand All @@ -77,6 +79,8 @@ def _detect_linux_distro(self):
distro_name = "alpine"
elif (Path("/etc/redhat-release").exists() or Path("/etc/centos-release").exists()):
distro_name = "rhel"
elif (Path("/etc/SuSE-release").exists() or Path("/etc/SUSE-brand").exists()):
distro_name = "suse"
else:
distro_name = "debian_ubuntu"
except Exception:
Expand Down