diff --git a/requirements.txt b/requirements.txt index be244a75..7180de1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,7 @@ blake2b-py coloredlogs>=10.0 coincurve>=13.0.0 -cython -cytoolz<0.12.0 +cytoolz>=0.12.0 asn1crypto>=0.22.0 configparser>=3.5.0 coverage<7.0,>6.0 diff --git a/setup.py b/setup.py index 8df3550c..81523955 100755 --- a/setup.py +++ b/setup.py @@ -8,11 +8,20 @@ publish to pypi w/o having to convert Readme.md to RST: 2) #> twine upload dist/* #; #optional --repository or --repository-url """ from setuptools import setup, find_packages -from setuptools.command.install import install +from setuptools.command.install import install as _install +from subprocess import check_call + import sys import os import io + +class InstallCommand(_install): + def run(self): + check_call([sys.executable, "-m", "pip", "install", "cython"]) + _install.run(self) + + # Package meta-data. NAME = "mythril" DESCRIPTION = "Security analysis tool for Ethereum smart contracts" @@ -80,7 +89,7 @@ else: # Package version (vX.Y.Z). It must match git tag being used for CircleCI # deployment; otherwise the build will failed. -class VerifyVersionCommand(install): +class VerifyVersionCommand(_install): """Custom command to verify that the git tag matches our version.""" description = "verify that the git tag matches our version" @@ -126,5 +135,5 @@ setup( package_data={"mythril.analysis.templates": ["*"], "mythril.support.assets": ["*"]}, include_package_data=True, entry_points={"console_scripts": ["myth=mythril.interfaces.cli:main"]}, - cmdclass={"verify": VerifyVersionCommand}, + cmdclass={"install": InstallCommand, "verify": VerifyVersionCommand}, )