Commit bb081511 authored by Carlos Garnacho's avatar Carlos Garnacho

Merge branch 'sam/meson-writeback-extract-options' into 'master'

meson: Implement the 'extract' and 'writeback' options

Closes #29

See merge request !28
parents ab7f668c 59467d56
Pipeline #40288 passed with stage
in 1 minute and 21 seconds
......@@ -5,13 +5,17 @@ subdir('libtracker-miners-common')
subdir('libtracker-extract')
# Public data extract tool & modules
subdir('tracker-extract')
if get_option('extract')
subdir('tracker-extract')
endif
# Public miners
subdir('miners')
# Public metadata writeback tool & modiles
subdir('tracker-writeback')
if get_option('writeback')
subdir('tracker-writeback')
endif
custom_target('tracker-miners-settings-enums',
input: 'libtracker-miners-common/tracker-enums.h',
......
......@@ -21,6 +21,7 @@
from common.utils import configuration as cfg
from common.utils.helpers import log
import errno
import json
import os
import re
......@@ -42,7 +43,13 @@ def get_tracker_extract_jsonld_output(filename, mime_type=None):
env['TRACKER_VERBOSITY'] = '0'
log ('Running: %s' % ' '.join(command))
p = subprocess.Popen (command, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
try:
p = subprocess.Popen (command, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError as e:
if e.errno == errno.ENOENT:
raise RuntimeError("Did not find tracker-extract binary. Is the 'extract' option disabled?")
else:
raise RuntimeError("Error running tracker-extract: %s" % (e))
stdout, stderr = p.communicate()
if p.returncode != 0:
......
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