Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit b118aef

Browse files
authored
Merge pull request #407 from LefterisJP/allow_solc_binary_specification
Allow setting of a specific solc binary
2 parents 507099b + 8dbc0c8 commit b118aef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ethereum/_solidity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ def get_compiler_path():
2222
This funtion will search for the solc binary in the $PATH and return the
2323
path of the first executable occurence.
2424
"""
25+
# If the user provides a specific solc binary let's use that
26+
given_binary = os.environ.get('SOLC_BINARY')
27+
if given_binary:
28+
return given_binary
29+
2530
for path in os.getenv('PATH', '').split(os.pathsep):
2631
path = path.strip('"')
2732
executable_path = os.path.join(path, BINARY)

0 commit comments

Comments
 (0)