From 180de41c2c583e928ffaa02e735cc508a2abda7d Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Sat, 12 Jan 2019 12:27:30 +0530 Subject: [PATCH] Move signatures.db to mythril.support --- MANIFEST.in | 2 +- mythril/mythril.py | 4 ++-- signatures.db => mythril/support/signatures.db | Bin setup.py | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) rename signatures.db => mythril/support/signatures.db (100%) diff --git a/MANIFEST.in b/MANIFEST.in index de31ad6b..bd22ef0c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include signatures.db +include mythril/support/signatures.db include mythril/analysis/templates/* diff --git a/mythril/mythril.py b/mythril/mythril.py index 7c6e0887..a24db6ef 100644 --- a/mythril/mythril.py +++ b/mythril/mythril.py @@ -134,8 +134,8 @@ class Mythril(object): if not os.path.exists(db_path): # if the default mythril dir doesn't contain a signature DB # initialize it with the default one from the project root - parent_dir = Path(__file__).parent.parent - copyfile(str(parent_dir / "signatures.db"), db_path) + support_dir = Path(__file__).parent.parent + copyfile(str(support_dir / "signatures.db"), db_path) return mythril_dir diff --git a/signatures.db b/mythril/support/signatures.db similarity index 100% rename from signatures.db rename to mythril/support/signatures.db diff --git a/setup.py b/setup.py index d90e08d1..75e9519d 100755 --- a/setup.py +++ b/setup.py @@ -101,7 +101,10 @@ setup( tests_require=["pytest>=3.6.0", "pytest_mock", "pytest-cov"], python_requires=">=3.5", extras_require={}, - package_data={"mythril.analysis.templates": ["*"], "": ["signatures.db"]}, + package_data={ + "mythril.analysis.templates": ["*"], + "mythril.support": ["signatures.db"], + }, include_package_data=True, entry_points={"console_scripts": ["myth=mythril.interfaces.cli:main"]}, cmdclass={"verify": VerifyVersionCommand},