Skip to content

Instantly share code, notes, and snippets.

@cds-amal
Created March 12, 2015 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cds-amal/c85abd2e67c855006eb6 to your computer and use it in GitHub Desktop.
Save cds-amal/c85abd2e67c855006eb6 to your computer and use it in GitHub Desktop.
import sysconfig
config = sysconfig.get_config_vars()
keys = config.keys()
keys.sort()
for k in keys:
print '%s: %s' % (k, config[k])
@cds-amal
Copy link
Author

This should give the build options for the version of python that runs it.

@clhenrick
Copy link

is this the output you're looking for?

PYLONG_BITS_IN_DIGIT: 0
PYTHON: python
PYTHONFRAMEWORK: 
PYTHONFRAMEWORKDIR: no-framework
PYTHONFRAMEWORKINSTALLDIR: 
PYTHONFRAMEWORKPREFIX: 
PYTHONPATH: :plat-x86_64-linux-gnu:lib-tk:lib-old
PYTHON_FOR_BUILD: ./python -E
PYTHON_HEADERS: \
PYTHON_OBJS: \
PY_CFLAGS: -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  
PY_CORE_CFLAGS: -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security   -I. -IInclude -I../Include -fPIC -DPy_BUILD_CORE
PY_CPPFLAGS: -I. -IInclude -I../Include
PY_FORMAT_LONG_LONG: "ll"
PY_FORMAT_SIZE_T: "z"
PY_LDFLAGS: -Wl,-Bsymbolic-functions -Wl,-z,relro
PY_UNICODE_TYPE: 0
Py_DEBUG: 0
Py_ENABLE_SHARED: 1
Py_UNICODE_SIZE: 4
Py_USING_UNICODE: 1

@clhenrick
Copy link

above is my server, this is my local machine:

PYLONG_BITS_IN_DIGIT: 0
PYTHON: python
PYTHONFRAMEWORK: Python
PYTHONFRAMEWORKDIR: Python.framework
PYTHONFRAMEWORKINSTALLDIR: /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework
PYTHONFRAMEWORKPREFIX: /usr/local/Cellar/python/2.7.9/Frameworks
PYTHONPATH: :plat-darwin:plat-mac:plat-mac/lib-scriptpackages:lib-tk:lib-old
PYTHON_FOR_BUILD: ./python.exe -E
PYTHON_HEADERS: \
PYTHON_OBJS: \
PY_CFLAGS: -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include  -DPy_BUILD_CORE
PY_FORMAT_LONG_LONG: "ll"
PY_FORMAT_SIZE_T: "z"
PY_UNICODE_TYPE: unsigned short
Py_DEBUG: 0
Py_ENABLE_SHARED: 0
Py_UNICODE_SIZE: 2
Py_USING_UNICODE: 1

@cds-amal
Copy link
Author

Hi Chris,

Unfortunately, this sheds no light -- I sent you an email on how to work around this issue in the mean time.

-- Amal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment