diff --git a/README.md b/README.md index 5da2601..2ca2d33 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Eris maintains an up-to-date set of reports for every file in a codebase. # git clone https://github.com/ahamilton/eris # cd eris # ./install-dependencies - # python3.8 -m pip install . + # python3.7 -m pip install . To test its working properly: diff --git a/appimage/AppRun b/appimage/AppRun index 8c1daa9..2fa6541 100755 --- a/appimage/AppRun +++ b/appimage/AppRun @@ -13,7 +13,7 @@ export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/local/bin/:"${PATH}" export UNION_PRELOAD="${HERE}" export LD_PRELOAD="${HERE}/libunionpreload.so" export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}" -export PYTHONPATH=/usr/local/lib/python3.8/dist-packages:"${PYTHONPATH}" +export PYTHONPATH=/usr/local/lib/python3.7/dist-packages:"${PYTHONPATH}" if [ -z $APPIMAGE_ENTER ]; then EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g') exec ${EXEC} $@ diff --git a/build-flatpak.py b/build-flatpak.py index 61a0399..f60de7d 100755 --- a/build-flatpak.py +++ b/build-flatpak.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3.8 +#!/usr/bin/python3.7 # Copyright (C) 2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/eris/__main__.py b/eris/__main__.py index d8973c9..e446868 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # -*- coding: utf-8 -*- # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. diff --git a/eris/gut.py b/eris/gut.py index cd69bb3..fd8b49b 100755 --- a/eris/gut.py +++ b/eris/gut.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/eris/pydoc_color.py b/eris/pydoc_color.py index b35cd81..4404175 100755 --- a/eris/pydoc_color.py +++ b/eris/pydoc_color.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/eris/tools.py b/eris/tools.py index bde4d11..7150fa2 100755 --- a/eris/tools.py +++ b/eris/tools.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3.8 +#!/usr/bin/python3.7 # -*- coding: utf-8 -*- # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. @@ -34,7 +34,7 @@ import eris.lscolors as lscolors import eris.termstr as termstr -PYTHON_VERSION = "3.8" +PYTHON_VERSION = "3.7" PYTHON_EXECUTABLE = "python" + PYTHON_VERSION CACHE_PATH = ".eris" @@ -303,11 +303,11 @@ def pytest(path): @deps(deps={"pip/mypy"}, url="http://mypy-lang.org/", executables={"mypy"}) def mypy(path): - env = os.environ.copy() - env["MYPY_FORCE_COLOR"] = "1" - return _run_command([PYTHON_EXECUTABLE, "-m", "mypy", "--color-output", - "--ignore-missing-imports", "--pretty", path], - timeout=TIMEOUT, has_color=True, env=env) + stdout, stderr, returncode = _do_command( + [PYTHON_EXECUTABLE, "-m", "mypy", "--ignore-missing-imports", path], + timeout=TIMEOUT) + status = Status.ok if returncode == 0 else Status.problem + return status, stdout def _colorize_coverage_report(lines): diff --git a/eris/tools.toml b/eris/tools.toml index 26ea578..b277eba 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -49,7 +49,7 @@ tools_for_extensions = [ [python_syntax] dependencies = [] url = "https://en.wikipedia.org/wiki/Python_syntax_and_semantics" - command = "python3.8 -m py_compile" + command = "python3.7 -m py_compile" [pydoc] dependencies = [] @@ -63,34 +63,34 @@ tools_for_extensions = [ [pycodestyle] dependencies = ["pip/pycodestyle"] url = "http://pycodestyle.pycqa.org/en/latest/" - command = "python3.8 -m pycodestyle" + command = "python3.7 -m pycodestyle" [pydocstyle] dependencies = ["pip/pydocstyle"] url = "http://www.pydocstyle.org/en/2.1.1/usage.html" - command = "python3.8 -m pydocstyle --ignore=D1,D213" + command = "python3.7 -m pydocstyle --ignore=D1,D213" [pyflakes] dependencies = ["pip/pyflakes"] url = "https://pypi.org/project/pyflakes/" - command = "python3.8 -m pyflakes" + command = "python3.7 -m pyflakes" [pylint] dependencies = ["pip/pylint"] url = "https://www.pylint.org/" - command = "python3.8 -m pylint -f colorized --errors-only" + command = "python3.7 -m pylint -f colorized --errors-only" has_color = true [python_modulefinder] dependencies = [] url = "https://docs.python.org/3/library/modulefinder.html" - command = "python3.8 -m modulefinder" + command = "python3.7 -m modulefinder" success_status = "normal" [bandit] dependencies = ["pip/bandit"] url = "https://pypi.org/project/bandit/" - command = "python3.8 -m bandit.cli.main -f screen" + command = "python3.7 -m bandit.cli.main -f screen" has_color = true timeout = 60 @@ -132,7 +132,7 @@ tools_for_extensions = [ [dis] dependencies = [] url = "https://docs.python.org/3/library/dis.html" - command = "python3.8 -m dis" + command = "python3.7 -m dis" success_status = "normal" [objdump_headers] @@ -303,7 +303,7 @@ tools_for_extensions = [ [yamllint] dependencies = ["pip/yamllint"] url = "https://github.com/adrienverge/yamllint" - command = "python3.8 -m yamllint -f colored" + command = "python3.7 -m yamllint -f colored" has_color = true [mediainfo] diff --git a/eris/webserver.py b/eris/webserver.py index befc98b..6a83fd1 100755 --- a/eris/webserver.py +++ b/eris/webserver.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2018-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/eris/worker.py b/eris/worker.py index c46c0c7..61a6ad8 100755 --- a/eris/worker.py +++ b/eris/worker.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/install-dependencies b/install-dependencies index 6c3e916..76439fd 100755 --- a/install-dependencies +++ b/install-dependencies @@ -13,8 +13,8 @@ if [ $DIST_ID != "ubuntu" ]; then exit 1 fi echo "Installing the dependencies of the eris script…" -sudo apt --yes install python3-pip python3.8 util-linux -python3.8 -m pip install pyinotify pygments docopt pillow toml +sudo apt --yes install python3-pip python3.7 util-linux +python3.7 -m pip install pyinotify pygments docopt pillow toml echo echo "Installing all the tools eris may need…" ./install-tools diff --git a/install-tools b/install-tools index 3529289..7741a33 100755 --- a/install-tools +++ b/install-tools @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/make-appimage.py b/make-appimage.py index 41dd95c..6f499d3 100755 --- a/make-appimage.py +++ b/make-appimage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2017-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/make-flatpak-manifest.py b/make-flatpak-manifest.py index 2ce414a..f1c3681 100755 --- a/make-flatpak-manifest.py +++ b/make-flatpak-manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3.8 +#!/usr/bin/python3.7 # Copyright (C) 2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. @@ -106,7 +106,7 @@ def haskell_modules(dep): def python_modules(package): - python_version = "python3.8" + python_version = "python3.7" with tempfile.TemporaryDirectory() as temp_dir: output = subprocess.check_output( [python_version, "-m", "pip", "download", "--dest", temp_dir, @@ -398,7 +398,7 @@ def eris_modules(): modules.append({"name": "eris", "buildsystem": "simple", "build-commands": [ - "python3.8 -m pip install --no-index --prefix=/app .", + "python3.7 -m pip install --no-index --prefix=/app .", "cp -a tests test-all /app/bin"], "sources": [{"type": "git", "url": eris_url, "commit": get_latest_commit()}]}) diff --git a/make-readme.py b/make-readme.py index bb17f02..423dec3 100755 --- a/make-readme.py +++ b/make-readme.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # -*- coding: utf-8 -*- # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. @@ -36,7 +36,7 @@ Eris maintains an up-to-date set of reports for every file in a codebase. # git clone https://github.com/ahamilton/eris # cd eris # ./install-dependencies - # python3.8 -m pip install . + # python3.7 -m pip install . To test its working properly: diff --git a/setup.py b/setup.py index b155930..cd57867 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2017-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/test_distributions.py b/test_distributions.py index 7230036..c4f1be4 100755 --- a/test_distributions.py +++ b/test_distributions.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2017-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/__main___test.py b/tests/__main___test.py index d532617..89e7555 100755 --- a/tests/__main___test.py +++ b/tests/__main___test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/fill3_test.py b/tests/fill3_test.py index 44187b7..d987e70 100755 --- a/tests/fill3_test.py +++ b/tests/fill3_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # -*- coding: utf-8 -*- # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. diff --git a/tests/golden-files/results/mypy-hi3_py b/tests/golden-files/results/mypy-hi3_py index 953416d..e69de29 100644 --- a/tests/golden-files/results/mypy-hi3_py +++ b/tests/golden-files/results/mypy-hi3_py @@ -1,2 +0,0 @@ -Success: no issues found in 1 source file - \ No newline at end of file diff --git a/tests/gut_test.py b/tests/gut_test.py index ca3e36e..f2674fd 100755 --- a/tests/gut_test.py +++ b/tests/gut_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/lscolors_test.py b/tests/lscolors_test.py index c71950a..823e28e 100755 --- a/tests/lscolors_test.py +++ b/tests/lscolors_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2011, 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/paged_list_test.py b/tests/paged_list_test.py index ca2c45a..26f0f6e 100755 --- a/tests/paged_list_test.py +++ b/tests/paged_list_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/termstr_test.py b/tests/termstr_test.py index 114b22a..522f7e6 100755 --- a/tests/termstr_test.py +++ b/tests/termstr_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/tools_test.py b/tests/tools_test.py index 216753a..804671e 100755 --- a/tests/tools_test.py +++ b/tests/tools_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2016-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. diff --git a/tests/worker_test.py b/tests/worker_test.py index 29d0a40..0f07a97 100755 --- a/tests/worker_test.py +++ b/tests/worker_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.8 +#!/usr/bin/env python3.7 # Copyright (C) 2016-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0.