File: meson.build

package info (click to toggle)
libmodulemd 2.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,152 kB
  • sloc: ansic: 37,845; python: 3,236; xml: 1,739; sh: 377; makefile: 42
file content (34 lines) | stat: -rw-r--r-- 1,044 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
gobject_overrides_dir_py3 = get_option('gobject_overrides_dir_py3')
gobject_overrides_dir_py2 = get_option('gobject_overrides_dir_py2')

# Python 3
if with_py3
  if gobject_overrides_dir_py3 == ''
    ret = run_command([python3, '-c', 'import gi; print(gi._overridesdir)'],
      check: false)

    if ret.returncode() != 0
      error('Failed to determine Python 3 pygobject overridedir: @0@'.format(ret.stderr()))
    else
      gobject_overrides_dir_py3 = ret.stdout().strip()
    endif
  endif

  install_data('gi/overrides/Modulemd.py', install_dir: gobject_overrides_dir_py3)
endif

# Python 2
if with_py2
  if gobject_overrides_dir_py2 == ''
    ret2 = run_command([python2, '-c', 'import gi; print(gi._overridesdir)'],
      check: false)

    if ret2.returncode() != 0
      error('Failed to determine Python 2 pygobject overridedir: @0@'.format(ret2.stderr()))
    else
      gobject_overrides_dir_py2 = ret2.stdout().strip()
    endif
  endif

  install_data('gi/overrides/Modulemd.py', install_dir: gobject_overrides_dir_py2)
endif