Skip to content

Commit

Permalink
client: fall back to source install of solc if binary fails
Browse files Browse the repository at this point in the history
  • Loading branch information
dtebbs committed May 5, 2021
1 parent 9f6fcc7 commit bc7a539
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/zeth/core/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ def get_block_number(web3: Any) -> int:


def install_sol() -> None:
solcx.install_solc(SOL_COMPILER_VERSION)
try:
solcx.install_solc(SOL_COMPILER_VERSION)
except solcx.exceptions.SolcInstallationError:
from solcx.install import compile_solc # type: ignore
compile_solc(SOL_COMPILER_VERSION)


def compile_files(files: List[str], **kwargs: Any) -> Any:
Expand Down

0 comments on commit bc7a539

Please sign in to comment.