Biogeme: Python Library  2.5
biogeme-python3.3m-config.py
1 import sys
2 import sysconfig
3 option=sys.argv[1]
4 if option=='includes':
5  print('-I' + sysconfig.get_path('include') + ' -I' + sysconfig.get_path('platinclude'))
6 if option=='cxxflags':
7  flags=sysconfig.get_config_var('CFLAGS').split()
8  for unflag in ['-Wno-unused-result','-Wstrict-prototypes']:
9  if flags.count(unflag) > 0:
10  flags.remove(unflag)
11  print(' '.join(flags))
12 if option=='libs':
13  print('-lpython' + sysconfig.get_config_var('VERSION') + sys.abiflags + ' ' + sysconfig.get_config_var('LIBS') + ' ' + sysconfig.get_config_var('SYSLIBS'))
14 if option=='ldflags':
15  flags=sysconfig.get_config_var('LDFLAGS')
16  if not sysconfig.get_config_var('Py_ENABLE_SHARED'):
17  flags+=' -L'+sysconfig.get_config_var('LIBPL')
18  if not sysconfig.get_config_var('PYTHONFRAMEWORK'):
19  flags+=' ' + sysconfig.get_config_var('LINKFORSHARED')
20  flags += ' ' + sysconfig.get_config_var('LIBS') + ' ' + sysconfig.get_config_var('SYSLIBS')
21  print(flags)
22 if option=='headerdir':
23  print(sysconfig.get_path('include'))
24 if option=='version':
25  print(sysconfig.get_config_var('VERSION'))
Copyright 2016 Michel Bierlaire