Changeset View
Changeset View
Standalone View
Standalone View
swh/search/translator.py
Show All 12 Lines | RANGE_OPERATOR_MAP = { | ||||
"<": "lt", | "<": "lt", | ||||
">=": "gte", | ">=": "gte", | ||||
"<=": "lte", | "<=": "lte", | ||||
} | } | ||||
def __init__(self): | def __init__(self): | ||||
ql_rel_paths = [ | ql_rel_paths = [ | ||||
"static/swh_ql.so", # installed | "static/swh_ql.so", # installed | ||||
"../../query_language/static/swh_ql.so", # development | "../../query_language/swh_ql.so", # development | ||||
] | ] | ||||
for ql_rel_path in ql_rel_paths: | for ql_rel_path in ql_rel_paths: | ||||
ql_path = resource_filename("swh.search", ql_rel_path) | ql_path = resource_filename("swh.search", ql_rel_path) | ||||
if os.path.exists(ql_path): | if os.path.exists(ql_path): | ||||
break | break | ||||
else: | else: | ||||
assert False, "swh_ql.so was not found in any of the expected paths" | assert False, "swh_ql.so was not found in any of the expected paths" | ||||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |