Skip to content

Commit

Permalink
Merge pull request #19 from dmuhs/fix/upgrade-semver
Browse files Browse the repository at this point in the history
Upgrade semver package Spec to SimpleSpec
  • Loading branch information
iamdefinitelyahuman authored Sep 5, 2019
2 parents a21fdb7 + 26ca144 commit bd62875
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
setup_requires=['setuptools-markdown'],
python_requires='>=3.4, <4',
install_requires=[
"semantic_version>=2.6.0",
"semantic_version>=2.8.1",
"requests>=2.9.1"
],
license="MIT",
Expand Down
6 changes: 3 additions & 3 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path
import re
import requests
from semantic_version import Version, Spec
from semantic_version import Version, SimpleSpec
import shutil
import stat
import subprocess
Expand Down Expand Up @@ -179,7 +179,7 @@ def _select_pragma_version(pragma_string, version_list):
version = None

for comparator_set in comparator_set_range:
spec = Spec(*(i[0] for i in comparator_regex.findall(comparator_set)))
spec = SimpleSpec(*(i[0] for i in comparator_regex.findall(comparator_set)))
selected = spec.select(version_list)
if selected and (not version or version < selected):
version = selected
Expand Down Expand Up @@ -212,7 +212,7 @@ def install_solc(version, allow_osx=False):

def _check_version(version):
version = Version(version.lstrip('v'))
if version not in Spec('>=0.4.11'):
if version not in SimpleSpec('>=0.4.11'):
raise ValueError("py-solc-x does not support solc versions <0.4.11")
return "v" + str(version)

Expand Down
2 changes: 1 addition & 1 deletion solcx/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_solc_version(**kwargs):


def solc_supports_standard_json_interface(**kwargs):
return get_solc_version() in semantic_version.Spec('>=0.4.11')
return get_solc_version() in semantic_version.SimpleSpec('>=0.4.11')


def _parse_compiler_output(stdoutdata):
Expand Down

0 comments on commit bd62875

Please sign in to comment.