diff --git a/.github/workflows/IR.yml b/.github/workflows/IR.yml index 7b5d214a9..434cef75b 100644 --- a/.github/workflows/IR.yml +++ b/.github/workflows/IR.yml @@ -26,20 +26,14 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | - python setup.py install - pip install deepdiff - pip install pytest==7.0.1 - pip install typing_extensions==4.1.1 - pip install importlib_metadata==4.8.3 - - pip install "solc-select>=v1.0.0b1" + pip install ".[dev]" solc-select install all solc-select use 0.8.11 diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index c1a999b80..b805c4d9d 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -22,16 +22,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | - pip install . - pip install deepdiff numpy - mkdir -p .github/linters cp pyproject.toml .github/linters diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4d62d963..cc58ab718 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,19 +47,13 @@ jobs: type: truffle steps: - uses: actions/checkout@v1 - - name: Set up Python 3.8 uses: actions/setup-python@v3 with: python-version: 3.8 - name: Install dependencies run: | - - python setup.py install - # Used by ci_test.sh - pip install deepdiff - - pip install "solc-select>=v1.0.0b1" + pip install ".[dev]" solc-select install all solc-select use 0.5.1 pip install typing_extensions==4.1.1 diff --git a/.github/workflows/detectors.yml b/.github/workflows/detectors.yml index 4d8109297..8f3b45d15 100644 --- a/.github/workflows/detectors.yml +++ b/.github/workflows/detectors.yml @@ -26,21 +26,15 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | + pip install ".[dev]" - python setup.py install - pip install deepdiff - pip install pytest==7.0.1 - pip install typing_extensions==4.1.1 - pip install importlib_metadata==4.8.3 - - pip install "solc-select>=v1.0.0b1" solc-select install all solc-select use 0.7.3 - name: Test with pytest diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 3763faca0..8757d654a 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -26,21 +26,15 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | + pip install ".[dev]" - python setup.py install - pip install deepdiff - pip install pytest==7.0.1 - pip install typing_extensions==4.1.1 - pip install importlib_metadata==4.8.3 - - pip install "solc-select>=v1.0.0b1" solc-select install all solc-select use 0.8.0 diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index c1b31a1c4..5d9ff9017 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -22,16 +22,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | - pip install . - pip install deepdiff numpy - mkdir -p .github/linters cp pyproject.toml .github/linters diff --git a/.github/workflows/parser.yml b/.github/workflows/parser.yml index 4c3566904..5e11420cf 100644 --- a/.github/workflows/parser.yml +++ b/.github/workflows/parser.yml @@ -26,20 +26,14 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | - - python setup.py install - pip install deepdiff - pip install pytest==7.0.1 - pip install typing_extensions==4.1.1 - pip install importlib_metadata==4.8.3 - pip install "solc-select>=v1.0.0b1" + pip install ".[dev]" - name: Install solc run: | diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 692a981ab..04334a2d5 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -22,16 +22,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: 3.6 + python-version: 3.8 - name: Install dependencies run: | - pip install . - pip install deepdiff numpy - mkdir -p .github/linters cp pyproject.toml .github/linters diff --git a/.github/workflows/read_storage.yml b/.github/workflows/read_storage.yml index 2ca618a19..8a423d6c2 100644 --- a/.github/workflows/read_storage.yml +++ b/.github/workflows/read_storage.yml @@ -28,18 +28,15 @@ jobs: - name: Install ganache run: npm install --global ganache - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.8 - name: Install python dependencies run: | - python3 setup.py install - pip install web3 pytest deepdiff solc-select - pip install pytest==7.0.1 - pip install typing_extensions==4.1.1 - pip install importlib_metadata==4.8.3 + pip install ".[dev]" + pip install web3 solc-select install 0.8.1 solc-select install 0.8.10 solc-select use 0.8.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b1d78be3f..798dcc96b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,10 +41,7 @@ A code walkthrough is available [here](https://www.youtube.com/watch?v=EUl3UlYSl ## Development Environment Instructions for installing a development version of Slither can be found in our [wiki](https://github.com/crytic/slither/wiki/Developer-installation). -To run the unit tests, you need -- `deepdiff` installed (`pip install deepdiff`). -- `pycov` installed (`pip install pytest-cov`). -- [`solc-select`](https://github.com/crytic/solc-select) installed. +To run the unit tests, you need to clone this repository and run `pip install ".[dev]"`. ### Linters diff --git a/README.md b/README.md index 4290e4771..588ae6ee8 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ See the [Tool documentation](https://github.com/crytic/slither/wiki/Tool-Documen ## How to install -Slither requires Python 3.6+ and [solc](https://github.com/ethereum/solidity/), the Solidity compiler. +Slither requires Python 3.8+ and [solc](https://github.com/ethereum/solidity/), the Solidity compiler. ### Using Pip diff --git a/plugin_example/setup.py b/plugin_example/setup.py index 9cef2aaf9..1bc065394 100644 --- a/plugin_example/setup.py +++ b/plugin_example/setup.py @@ -7,7 +7,7 @@ setup( author="Trail of Bits", version="0.0", packages=find_packages(), - python_requires=">=3.6", + python_requires=">=3.8", install_requires=["slither-analyzer==0.1"], entry_points={ "slither_analyzer.plugin": "slither my-plugin=slither_my_plugin:make_plugin", diff --git a/scripts/ci_test_simil.sh b/scripts/ci_test_simil.sh index 1d405191e..7ef511759 100755 --- a/scripts/ci_test_simil.sh +++ b/scripts/ci_test_simil.sh @@ -2,8 +2,8 @@ ### Install requisites -pip3 install pybind11 -pip3 install https://github.com/facebookresearch/fastText/archive/0.2.0.zip +pip3.8 install pybind11 +pip3.8 install https://github.com/facebookresearch/fastText/archive/0.2.0.zip ### Test slither-simil diff --git a/setup.py b/setup.py index 1069f8aef..993862f03 100644 --- a/setup.py +++ b/setup.py @@ -10,13 +10,24 @@ setup( author="Trail of Bits", version="0.8.3", packages=find_packages(), - python_requires=">=3.6", + python_requires=">=3.8", install_requires=[ "prettytable>=0.7.2", "pysha3>=1.0.2", # "crytic-compile>=0.2.3", "crytic-compile", ], + extras_require={ + "dev": [ + "black==22.3.0", + "pylint==2.13.4", + "pytest", + "pytest-cov", + "deepdiff", + "numpy", + "solc-select>=v1.0.0b1", + ] + }, dependency_links=["git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile"], license="AGPL-3.0", long_description=long_description,