Skip to content

Commit

Permalink
Merge pull request #2 from iamdefinitelyahuman/develop
Browse files Browse the repository at this point in the history
better verbosity when building from source fails, bump version to 0.1.1
  • Loading branch information
iamdefinitelyahuman authored Feb 13, 2019
2 parents a4c291a + d545a57 commit 398e6b5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bin
*.so

# Packages
*.egg
*.eggs
*.egg-info
dist
build
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.1.1
-----

- Better verbosity when building from source fails

0.1.0
-----

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='py-solc-x',
version='0.1.0',
version='0.1.1',
description="""Python wrapper around the solc binary with 0.5.x support""",
long_description_markdown_filename='README.md',
author='Benjamin Hauser (forked from py-solc by Piper Merriam)',
Expand Down
19 changes: 14 additions & 5 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,20 @@ def _install_solc_osx(version):
original_path = os.getcwd()
os.mkdir(source_folder+'/build')
os.chdir(source_folder+'/build')
_check_subprocess_call(["cmake", ".."], message="Running cmake")
_check_subprocess_call(["make"], message="Running make")
os.chdir(original_path)
os.rename(source_folder+'/build/solc/solc', binary_path)
shutil.rmtree(source_folder)
try:
for cmd in (["cmake", ".."], ["make"]):
_check_subprocess_call(cmd, message="Running {}".format(cmd[0]))
os.chdir(original_path)
os.rename(source_folder+'/build/solc/solc', binary_path)
except subprocess.CalledProcessError as e:
raise OSError(
"{} returned non-zero exit status {}".format(cmd[0], e.returncode) +
" while attempting to build solc from the source. This is likely " +
"due to a missing or incorrect version of an external dependency."
)
finally:
os.chdir(original_path)
shutil.rmtree(source_folder)

_chmod_plus_x(binary_path)

Expand Down

0 comments on commit 398e6b5

Please sign in to comment.