|
|
|
@ -159,23 +159,25 @@ if args.solv: |
|
|
|
|
solc_binary = 'solc' |
|
|
|
|
else: |
|
|
|
|
if util.solc_exists(version): |
|
|
|
|
solc_binary = os.join(os.environ['HOME'], "/.py-solc/solc-v", version, "/bin/solc") |
|
|
|
|
print('Given version is already installed') |
|
|
|
|
solc_binary = os.path.join(os.environ['HOME'], ".py-solc/solc-v" + version, "bin/solc") |
|
|
|
|
print("Setting the compiler to " + str(solc_binary)) |
|
|
|
|
else: |
|
|
|
|
try: |
|
|
|
|
solc.install_solc('v' + version) |
|
|
|
|
solc_binary = os.join(os.environ['HOME'], "/.py-solc/solc-v", version, "/bin/solc") |
|
|
|
|
solc_binary = os.path.join(os.environ['HOME'], ".py-solc/solc-v" + version, "bin/solc") |
|
|
|
|
print("Setting the compiler to " + str(solc_binary)) |
|
|
|
|
except SolcError: |
|
|
|
|
exitWithError("There was an error when trying to install the specified solc version") |
|
|
|
|
else: |
|
|
|
|
try: |
|
|
|
|
solc_binary = os.environ['SOLC'] |
|
|
|
|
except KeyError: |
|
|
|
|
if not args.solv: |
|
|
|
|
try: |
|
|
|
|
solc_binary = 'solc' |
|
|
|
|
except: |
|
|
|
|
exitWithError('No solidity compiler found, please make sure it is installed or specify it manually.') |
|
|
|
|
solc_binary = os.environ['SOLC'] |
|
|
|
|
except KeyError: |
|
|
|
|
try: |
|
|
|
|
solc_binary = 'solc' |
|
|
|
|
except: |
|
|
|
|
exitWithError('No solidity compiler found, please make sure it is installed or specify it manually.') |
|
|
|
|
|
|
|
|
|
# Establish RPC/IPC connection if necessary |
|
|
|
|
|
|
|
|
|