Support pkg-config libmariadb (#631)

Fix #629.
This commit is contained in:
Inada Naoki
2023-06-29 17:36:30 +09:00
committed by GitHub
parent 4f2a8393c7
commit 807933eb25

View File

@ -14,7 +14,8 @@ with open("src/MySQLdb/release.py", encoding="utf-8") as f:
def find_package_name():
"""Get available pkg-config package name"""
packages = ["mysqlclient", "mariadb"]
# Ubuntu uses mariadb.pc, but CentOS uses libmariadb.pc
packages = ["mysqlclient", "mariadb", "libmariadb"]
for pkg in packages:
try:
cmd = f"pkg-config --exists {pkg}"
@ -153,7 +154,7 @@ if sys.platform == "win32":
else:
ext_options = get_config_posix(get_options())
print("# Options for building extention module:")
print("# Options for building extension module:")
for k, v in ext_options.items():
print(f" {k}: {v}")