Fix compiling error when missing gdbm version macros (GH-7823)

This commit is contained in:
Xiang Zhang 2018-06-20 21:23:30 +08:00 committed by GitHub
parent 16eb3bcdb2
commit b248e957a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -527,11 +527,11 @@ def collect_cc(info_add):
def collect_gdbm(info_add):
try:
import _gdbm
from _gdbm import _GDBM_VERSION
except ImportError:
return
info_add('gdbm.GDBM_VERSION', '.'.join(map(str, _gdbm._GDBM_VERSION)))
info_add('gdbm.GDBM_VERSION', '.'.join(map(str, _GDBM_VERSION)))
def collect_info(info):