File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 142142
143143extra_comp_args = subprocess .check_output ([mapnik_config , '--cflags' ]).rstrip ('\n ' ).split (' ' )
144144
145+ # Test to build with pycairo (has been moved out of mapnik proper)
146+ include_pycairo = False
147+ if "-DHAVE_CAIRO" in extra_comp_args :
148+ # Mapnik was built with Cairo
149+ try :
150+ from cairo import CAPI
151+ include_pycairo = True
152+ except ImportError :
153+ pass
154+
155+ if include_pycairo :
156+ # Get compiler flags for pycairo (PKG_CONFIG_PATH must be correct)
157+ extra_comp_args .append ('-DHAVE_PYCAIRO' )
158+ lib = "pycairo"
159+ if sys .version_info [0 ] > 3 :
160+ lib = "py3cairo"
161+ args = subprocess .check_output (["pkg-config" ,"--cflags" ,lib ]).rstrip ('\n ' ).split (' ' )
162+ extra_comp_args += args
163+
145164if sys .platform == 'darwin' :
146165 extra_comp_args .append ('-mmacosx-version-min=10.8' )
147166 linkflags .append ('-mmacosx-version-min=10.8' )
215234 'mapnik' ,
216235 'mapnik-wkt' ,
217236 'mapnik-json' ,
218- 'boost_thread' ,
237+ 'boost_thread-mt ' ,
219238 'boost_system' ,
220239 boost_python_lib ,
221240 ],
You can’t perform that action at this time.
0 commit comments