|
8 | 8 | 2) #> twine upload dist/* #<specify bdist_wheel version to upload>; #optional --repository <testpypi> or --repository-url <testpypi-url> |
9 | 9 | """ |
10 | 10 | from setuptools import setup, find_packages |
11 | | -from setuptools.command.install import install |
| 11 | +from setuptools.command.install import install as _install |
| 12 | +from subprocess import check_call |
| 13 | + |
12 | 14 | import sys |
13 | 15 | import os |
14 | 16 | import io |
15 | 17 |
|
| 18 | + |
| 19 | +class InstallCommand(_install): |
| 20 | + def run(self): |
| 21 | + check_call([sys.executable, "-m", "pip", "install", "cython"]) |
| 22 | + _install.run(self) |
| 23 | + |
| 24 | + |
16 | 25 | # Package meta-data. |
17 | 26 | NAME = "mythril" |
18 | 27 | DESCRIPTION = "Security analysis tool for Ethereum smart contracts" |
@@ -80,7 +89,7 @@ def get_requirements(): |
80 | 89 |
|
81 | 90 | # Package version (vX.Y.Z). It must match git tag being used for CircleCI |
82 | 91 | # deployment; otherwise the build will failed. |
83 | | -class VerifyVersionCommand(install): |
| 92 | +class VerifyVersionCommand(_install): |
84 | 93 | """Custom command to verify that the git tag matches our version.""" |
85 | 94 |
|
86 | 95 | description = "verify that the git tag matches our version" |
@@ -126,5 +135,5 @@ def run(self): |
126 | 135 | package_data={"mythril.analysis.templates": ["*"], "mythril.support.assets": ["*"]}, |
127 | 136 | include_package_data=True, |
128 | 137 | entry_points={"console_scripts": ["myth=mythril.interfaces.cli:main"]}, |
129 | | - cmdclass={"verify": VerifyVersionCommand}, |
| 138 | + cmdclass={"install": InstallCommand, "verify": VerifyVersionCommand}, |
130 | 139 | ) |
0 commit comments