Skip to content

Commit

Permalink
Do not rename paths in rust projects anymore, after build (already do…
Browse files Browse the repository at this point in the history
…ne by the meta crate).
  • Loading branch information
andreibancioiu committed May 18, 2022
1 parent 0a7d35b commit 4dcd4d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion erdpy/projects/project_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def build(self, options: Union[Dict[str, Any], None] = None) -> List[Path]:
self._ensure_dependencies_installed()
self.perform_build()
contract_paths = self._do_after_build_custom()
contract_paths = rename_wasm_files(contract_paths, self.options.get("wasm_name"))
self._do_after_build_core()
return contract_paths

Expand Down
6 changes: 4 additions & 2 deletions erdpy/projects/project_clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import List

from erdpy import dependencies, errors, myprocess, utils
from erdpy.projects.project_base import Project
from erdpy.projects.project_base import Project, rename_wasm_files

logger = logging.getLogger('ProjectClang')

Expand Down Expand Up @@ -109,7 +109,9 @@ def _do_after_build_custom(self) -> List[Path]:
ll_file.unlink()
except FileNotFoundError:
pass
return [output_wasm_file]

paths = rename_wasm_files([output_wasm_file], self.options.get("wasm_name"))
return paths

def _get_llvm_path(self):
return dependencies.get_module_directory('llvm')
Expand Down
6 changes: 4 additions & 2 deletions erdpy/projects/project_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import List

from erdpy import dependencies, errors, myprocess, utils
from erdpy.projects.project_base import Project
from erdpy.projects.project_base import Project, rename_wasm_files

logger = logging.getLogger("ProjectCpp")

Expand Down Expand Up @@ -87,7 +87,9 @@ def _do_after_build_custom(self) -> List[Path]:
os.remove(source_file.with_suffix(".wasm"))
os.remove(source_file.with_suffix(".ll"))
os.remove(source_file.with_suffix(".o"))
return [output_wasm_file]

paths = rename_wasm_files([output_wasm_file], self.options.get("wasm_name"))
return paths

def _get_llvm_path(self):
return dependencies.get_module_directory("llvm")
Expand Down

0 comments on commit 4dcd4d7

Please sign in to comment.