diff --git a/crytic_compile/compiler/compiler.py b/crytic_compile/compiler/compiler.py index 50ce1186..87f27009 100644 --- a/crytic_compile/compiler/compiler.py +++ b/crytic_compile/compiler/compiler.py @@ -2,6 +2,7 @@ """ import logging from typing import Optional +from solc_select.solc_select import installed_versions, install_artifacts LOGGER = logging.getLogger("CryticCompile") @@ -40,15 +41,7 @@ def look_for_installed_version(self) -> None: Returns: """ - - # pylint: disable=import-outside-toplevel - try: - from solc_select import solc_select - - if self.version not in solc_select.installed_versions(): - solc_select.install_artifacts([self.version]) - - except ImportError: - LOGGER.info( - 'solc-select is not installed.\nRun "pip install solc-select" to enable automatic switch of solc versions' - ) + if self.version not in installed_versions(): + # TODO: check that the solc version was installed. + # Blocked by https://github.com/crytic/solc-select/issues/143 + install_artifacts([self.version]) diff --git a/setup.py b/setup.py index fb211927..dbf093eb 100644 --- a/setup.py +++ b/setup.py @@ -14,14 +14,13 @@ version="0.3.0", packages=find_packages(), python_requires=">=3.8", - install_requires=["pycryptodome>=3.4.6", "cbor2"], + install_requires=["pycryptodome>=3.4.6", "cbor2", "solc-select>=v1.0.2"], extras_require={ "dev": [ "black==22.3.0", "pylint==2.13.4", "mypy==0.942", "darglint==1.8.0", - "solc-select>=v1.0.0b1", ] }, license="AGPL-3.0",