Page MenuHomeSoftware Heritage

D6048.id21879.diff
No OneTemporary

D6048.id21879.diff

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -103,8 +103,14 @@
self.run_command("ts_build")
system("echo 'static files generated. copying them to package dir'")
- system(f"cp query_language/swh_ql.so {self.build_lib}/swh/search/swh_ql.so")
- system(f"cp query_language/swh_ql.wasm {self.build_lib}/swh/search/swh_ql.wasm")
+ system(f"mkdir {self.build_lib}/swh/search/static")
+ system(
+ f"cp query_language/swh_ql.so {self.build_lib}/swh/search/static/swh_ql.so"
+ )
+ system(
+ f"cp query_language/swh_ql.wasm "
+ f"{self.build_lib}/swh/search/static/swh_ql.wasm"
+ )
class custom_build(build_py):
@@ -125,8 +131,14 @@
self.run_command("ts_build")
system("echo 'static files generated. copying them to package dir'")
- system(f"cp query_language/swh_ql.so {base_dir}/swh/search/swh_ql.so")
- system(f"cp query_language/swh_ql.wasm {base_dir}/swh/search/swh_ql.wasm")
+ system(f"mkdir {base_dir}/swh/search/static")
+ system(
+ f"cp query_language/swh_ql.so {base_dir}/swh/search/static/swh_ql.so"
+ )
+ system(
+ f"cp query_language/swh_ql.wasm "
+ f"{base_dir}/swh/search/static/swh_ql.wasm"
+ )
setup(
diff --git a/swh/search/translator.py b/swh/search/translator.py
--- a/swh/search/translator.py
+++ b/swh/search/translator.py
@@ -17,8 +17,8 @@
def __init__(self):
ql_rel_paths = [
- "swh_ql.so", # installed
- "../../query_language/swh_ql.so", # development
+ "static/swh_ql.so", # installed
+ "../../query_language/static/swh_ql.so", # development
]
for ql_rel_path in ql_rel_paths:
ql_path = resource_filename("swh.search", ql_rel_path)

File Metadata

Mime Type
text/plain
Expires
Nov 4 2024, 8:40 PM (11 w, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218783

Event Timeline