111 conf.check_python_headers() |
113 conf.check_python_headers() |
112 except Configure.ConfigurationError, ex: |
114 except Configure.ConfigurationError, ex: |
113 conf.report_optional_feature("python", "Python Bindings", False, str(ex)) |
115 conf.report_optional_feature("python", "Python Bindings", False, str(ex)) |
114 return |
116 return |
115 |
117 |
|
118 |
|
119 # alternative code to computing PYTHONDIR, that is more correct than the one in waf 1.5.16 |
|
120 if 'PYTHONDIR' in conf.environ: |
|
121 pydir = conf.environ['PYTHONDIR'] |
|
122 else: |
|
123 (pydir,) = _get_python_variables(conf.env['PYTHON'], |
|
124 ["get_python_lib(standard_lib=0, prefix=%r)" % conf.env['PREFIX']], |
|
125 ['from distutils.sysconfig import get_python_lib']) |
|
126 if hasattr(conf, 'define'): # conf.define is added by the C tool, so may not exist |
|
127 conf.define('PYTHONDIR', pydir) |
|
128 conf.env['PYTHONDIR'] = pydir |
|
129 |
|
130 |
116 # -fvisibility=hidden optimization |
131 # -fvisibility=hidden optimization |
117 if (conf.env['CXX_NAME'] == 'gcc' and [int(x) for x in conf.env['CC_VERSION']] >= [4,0,0] |
132 if (conf.env['CXX_NAME'] == 'gcc' and [int(x) for x in conf.env['CC_VERSION']] >= [4,0,0] |
118 and conf.check_compilation_flag('-fvisibility=hidden')): |
133 and conf.check_compilation_flag('-fvisibility=hidden')): |
119 conf.env.append_value('CXXFLAGS_PYEXT', '-fvisibility=hidden') |
134 conf.env.append_value('CXXFLAGS_PYEXT', '-fvisibility=hidden') |
120 conf.env.append_value('CCFLAGS_PYEXT', '-fvisibility=hidden') |
135 conf.env.append_value('CCFLAGS_PYEXT', '-fvisibility=hidden') |