From a724d234c3bb6c1177c65cc96482f03116d61049 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 6 Nov 2021 23:58:17 +1000 Subject: [PATCH] Extract lscolors into its own python project. --- eris/requirements.txt | 1 + install | 1 + {eris => lscolors}/lscolors.py | 5 +---- lscolors/setup.py | 16 ++++++++++++++++ {eris => lscolors}/tests/lscolors_test.py | 0 test-all | 2 +- 6 files changed, 20 insertions(+), 5 deletions(-) rename {eris => lscolors}/lscolors.py (97%) create mode 100755 lscolors/setup.py rename {eris => lscolors}/tests/lscolors_test.py (100%) diff --git a/eris/requirements.txt b/eris/requirements.txt index cbfb3bc..0f6b96a 100644 --- a/eris/requirements.txt +++ b/eris/requirements.txt @@ -7,3 +7,4 @@ decorator==5.1.0 pexpect==4.8.0 termstr==2021.10.18 fill3==2021.10.18 +lscolors==2021.10.18 diff --git a/install b/install index c461900..c1b77ea 100755 --- a/install +++ b/install @@ -6,5 +6,6 @@ set -e python3.9 -m pip install -r ./termstr/requirements.txt $1 ./termstr python3.9 -m pip install -r ./fill3/requirements.txt $1 ./fill3 +python3.9 -m pip install $1 ./lscolors python3.9 -m pip install -r ./eris/requirements.txt $1 ./eris ./install-tools diff --git a/eris/lscolors.py b/lscolors/lscolors.py similarity index 97% rename from eris/lscolors.py rename to lscolors/lscolors.py index 3e4d388..4c73d9e 100644 --- a/eris/lscolors.py +++ b/lscolors/lscolors.py @@ -1,10 +1,7 @@ -"""Determine a color for a file based on its file type. - -This is done in the same way as the ls command. -""" +"""Give coloring for file types as in the ls command.""" import os diff --git a/lscolors/setup.py b/lscolors/setup.py new file mode 100755 index 0000000..2f05650 --- /dev/null +++ b/lscolors/setup.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3.9 + + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + + +setup(name="lscolors", + version="2021.10.18", + description=("Give coloring for file types as in the ls command."), + url="https://github.com/ahamilton/eris", + author="Andrew Hamilton", + license="Artistic 2.0", + py_modules=["lscolors"]) diff --git a/eris/tests/lscolors_test.py b/lscolors/tests/lscolors_test.py similarity index 100% rename from eris/tests/lscolors_test.py rename to lscolors/tests/lscolors_test.py diff --git a/test-all b/test-all index 281133d..c6c8410 100755 --- a/test-all +++ b/test-all @@ -4,7 +4,7 @@ FAILURE=0 CODEBASE_PATH=$(dirname $0) cd ${CODEBASE_PATH} -for test in {termstr,fill3,eris}/tests/*_test.py; do +for test in {termstr,fill3,lscolors,eris}/tests/*_test.py; do echo "Testing $test …" ./${test} 2>&1 FAILURE=$(($FAILURE | $?))