pythoninfo: add Py_DEBUG (#4198)

This commit is contained in:
Victor Stinner 2017-10-31 08:41:10 -07:00 committed by GitHub
parent e1a470bd6a
commit afd055a59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -115,6 +115,14 @@ def collect_sys(info_add):
encoding = '%s/%s' % (encoding, errors)
info_add('sys.%s.encoding' % name, encoding)
# Were we compiled --with-pydebug or with #define Py_DEBUG?
Py_DEBUG = hasattr(sys, 'gettotalrefcount')
if Py_DEBUG:
text = 'Yes (sys.gettotalrefcount() present)'
else:
text = 'No (sys.gettotalrefcount() missing)'
info_add('Py_DEBUG', text)
def collect_platform(info_add):
import platform