Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use recent cytoolz and move cython installation to setup.py #1794

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 12 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@
2) #> twine upload dist/* #<specify bdist_wheel version to upload>; #optional --repository <testpypi> or --repository-url <testpypi-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"
Expand Down Expand Up @@ -80,7 +89,7 @@ def get_requirements():

# 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"
Expand Down Expand Up @@ -126,5 +135,5 @@ def run(self):
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},
)