Commit beed1737 authored by Christoph Reiter's avatar Christoph Reiter 馃悕

meson: support building pycairo as a subproject

parent 898bbe50
Pipeline #17035 passed with stages
in 15 minutes and 46 seconds
......@@ -42,10 +42,17 @@ if with_pycairo
cairo_gobject_dep = dependency('cairo-gobject')
if python.language_version().version_compare('>= 3.0')
pycairo_dep = dependency('py3cairo', version : pycairo_version_req)
pycairo_name = 'py3cairo'
else
pycairo_dep = dependency('pycairo', version : pycairo_version_req)
pycairo_name = 'pycairo'
endif
pycairo_dep = dependency(
pycairo_name,
version: pycairo_version_req,
fallback: ['pycairo', 'pycairo_dep'],
default_options: ['python=' + get_option('python')],
)
endif
cc = meson.get_compiler('c')
......
[wrap-git]
directory=pycairo
url=https://github.com/pygobject/pycairo.git
revision=master
......@@ -118,7 +118,12 @@ endif
if host_machine.system() == 'windows'
envdata.prepend('PATH', join_paths(get_option('prefix'), get_option('bindir')))
endif
envdata.append('PYTHONPATH', join_paths(meson.current_build_dir(), '..'))
python_paths = [join_paths(meson.current_build_dir(), '..')]
if with_pycairo and pycairo_dep.type_name() == 'internal'
python_paths += [join_paths(meson.build_root(), 'subprojects', 'pycairo')]
endif
envdata.append('PYTHONPATH', python_paths)
envdata.append('TESTS_BUILDDIR', meson.current_build_dir())
test('pygobject-test-suite', python,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment