From 0080db66d42a29b5acef3d23f0a560b0aaa394d9 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 28 Jun 2017 09:07:40 +0100 Subject: [PATCH] Used test-distributions to fix the installation. - Correctly using our urwid. - LS_COLORS needed to be in the package. - Didn't need to use pip3. --- README.md | 6 +----- make-readme.py | 6 +----- setup.py | 3 ++- test-distributions | 8 ++++++-- LS_COLORS.sh => vigil/LS_COLORS.sh | 0 vigil/fill3.py | 6 +++--- vigil/tools.py | 3 +-- vigil/urwid/raw_display.py | 2 +- 8 files changed, 15 insertions(+), 19 deletions(-) rename LS_COLORS.sh => vigil/LS_COLORS.sh (100%) diff --git a/README.md b/README.md index 5ad185d..f1437a8 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,12 @@ Vigil maintains an up-to-date set of reports for every file in a codebase. # git clone https://github.com/ahamilton/vigil # cd vigil # ./install-dependencies - # pip3 install . + # sudo python3 setup.py install (pip3 can be used here) then to run: # vigil -and to test its working properly: - - # ./test-all - ### Tools Extensions | Tools diff --git a/make-readme.py b/make-readme.py index 5abf7ff..d41a238 100755 --- a/make-readme.py +++ b/make-readme.py @@ -28,16 +28,12 @@ Vigil maintains an up-to-date set of reports for every file in a codebase. # git clone https://github.com/ahamilton/vigil # cd vigil # ./install-dependencies - # pip3 install . + # sudo python3 setup.py install (pip3 can be used here) then to run: # vigil -and to test its working properly: - - # ./test-all - ### Tools Extensions | Tools diff --git a/setup.py b/setup.py index 7b89a2f..fcd3517 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,8 @@ setup(name="vigil", url="https://github.com/ahamilton/vigil", author="Andrew Hamilton", license="Artistic 2.0", - packages=["vigil"], + packages=["vigil", "vigil.urwid"], + package_data={"vigil": ["LS_COLORS.sh"]}, entry_points={"console_scripts": ["vigil=vigil.__main__:entry_point", "vigil-worker=vigil.worker:main"]}) diff --git a/test-distributions b/test-distributions index 8ec47fc..cf2ec04 100755 --- a/test-distributions +++ b/test-distributions @@ -156,9 +156,13 @@ for DISTRIBUTION in ubuntu fedora debian archlinux opensuse pixel gentoo; do fi echo "Installing vigil's dependencies in $DISTRIBUTION..." run_in_container $DISTRIBUTION ./install-dependencies + echo "Installing vigil in $DISTRIBUTION..." + run_in_container $DISTRIBUTION sudo python3 setup.py install echo "Testing executables are installed in $DISTRIBUTION..." - run_in_container $DISTRIBUTION ./tools_test.py ExecutablesTestCase - echo "Successfully installed vigil's dependencies in $DISTRIBUTION." + run_in_container $DISTRIBUTION ./tests/tools_test.py ExecutablesTestCase + echo "Running vigil in $DISTRIBUTION..." + run_in_container $DISTRIBUTION vigil --help + echo "Successfully installed vigil in $DISTRIBUTION." echo "Removing $DISTRIBUTION container..." remove_$DISTRIBUTION done diff --git a/LS_COLORS.sh b/vigil/LS_COLORS.sh similarity index 100% rename from LS_COLORS.sh rename to vigil/LS_COLORS.sh diff --git a/vigil/fill3.py b/vigil/fill3.py index a646921..b185774 100644 --- a/vigil/fill3.py +++ b/vigil/fill3.py @@ -12,8 +12,8 @@ import os import signal import sys -import urwid -import urwid.raw_display +import vigil.urwid +import vigil.urwid.raw_display import vigil.terminal as terminal import vigil.termstr as termstr @@ -436,7 +436,7 @@ def patch_screen(widget): @contextlib.contextmanager def _urwid_screen(): - screen = urwid.raw_display.Screen() + screen = vigil.urwid.raw_display.Screen() screen.set_mouse_tracking(True) screen.start() try: diff --git a/vigil/tools.py b/vigil/tools.py index 9074af8..6cc9550 100644 --- a/vigil/tools.py +++ b/vigil/tools.py @@ -400,8 +400,7 @@ def pycodestyle(path): return _run_command([_python_version(path), "-m", "pycodestyle", path]) -@deps(deps={"python-pyflakes", "python3-pyflakes"}, - arch_deps={"python2-pyflakes", "python-pyflakes"}, +@deps(deps={"pyflakes"}, arch_deps={"python2-pyflakes", "python-pyflakes"}, opensuse_deps={"python2-pyflakes", "python3-pyflakes"}, url="pyflakes", missing_in={"gentoo"}) def pyflakes(path): diff --git a/vigil/urwid/raw_display.py b/vigil/urwid/raw_display.py index afb76b2..f69df45 100644 --- a/vigil/urwid/raw_display.py +++ b/vigil/urwid/raw_display.py @@ -28,7 +28,7 @@ import sys import termios import tty -from urwid import escape +from vigil.urwid import escape class Screen: