Files
manticore/setup.py
T
Eric Hennenfent 36b3024ff0 Switch to Python 3.7 (#2472)
* Add version info to installations

* Let's try a newer version?

* Use fixed yices release

* Really? No relative path support?

* Can't handle newer C compilers

Ugh we should really do something about that

* Let's try 3.8

* Back to 3.7

3.6 is EOL soon, so we can justify jumping up to a more recent version, but 3.8 might still be too new for some people.

* Find & Replace 3.6 -> 3.7

* Bump setup-python version

* Fix additional 3.6 usage
2021-08-04 15:36:25 -07:00

89 lines
2.6 KiB
Python

import os
import sys
from setuptools import setup, find_packages
from datetime import date
on_rtd = os.environ.get("READTHEDOCS") == "True"
def rtd_dependent_deps():
# RTD tries to build z3, ooms, and fails to build.
if on_rtd:
return native_deps
else:
return ["z3-solver"]
# If you update native_deps please update the `REQUIREMENTS_TO_IMPORTS` dict in `utils/install_helper.py`
# (we need to know how to import a given native dependency so we can check if native dependencies are installed)
native_deps = ["capstone==4.0.2", "pyelftools", "unicorn==1.0.2"]
lint_deps = ["black==20.8b1", "mypy==0.790"]
auto_test_deps = ["py-evm"]
# Development dependencies without keystone
dev_noks = (
native_deps
+ ["coverage", "Sphinx", "pytest==5.3.0", "pytest-xdist==1.30.0", "pytest-cov==2.8.1", "jinja2"]
+ lint_deps
+ auto_test_deps
)
extra_require = {
"native": native_deps,
# noks - no keystone
"dev-noks": dev_noks,
"dev": native_deps + dev_noks + ["keystone-engine"],
"redis": ["redis"],
"lint": lint_deps,
}
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# https://stackoverflow.com/a/4792601 grumble grumble
version = "0.3.6"
if "--dev_release" in sys.argv:
major, minor, point = tuple(int(t) for t in version.split("."))
dev_extension = f"dev{date.today().strftime('%y%m%d')}"
version = f"{major}.{minor}.{point + 1}.{dev_extension}"
sys.argv.remove("--dev_release")
setup(
name="manticore",
description="Manticore is a symbolic execution tool for analysis of binaries and smart contracts.",
long_description_content_type="text/markdown",
long_description=long_description,
url="https://github.com/trailofbits/manticore",
author="Trail of Bits",
version=version,
packages=find_packages(exclude=["tests", "tests.*"]),
python_requires=">=3.7",
install_requires=[
"pyyaml",
"protobuf",
# evm dependencies
"pysha3",
"prettytable",
"ply",
"rlp",
"intervaltree",
"crytic-compile>=0.2.0",
"wasm",
"dataclasses; python_version < '3.7'",
"pyevmasm>=0.2.3",
]
+ rtd_dependent_deps(),
extras_require=extra_require,
entry_points={
"console_scripts": [
"manticore = manticore.__main__:main",
"manticore-verifier = manticore.ethereum.verifier:main",
]
},
classifiers=["License :: OSI Approved :: GNU Affero General Public License v3"],
)