You are welcome to doit

tasks => {doit + shell + python} => done

Declare your task(s) in

def task_compress():
    """Compress input file(s)"""
    return {
        "actions": [
            "7z a %(targets)s %(dependencies)s",
        "file_dep": ["lauer.dat", "hardy.dat", "elephant.txt"],
        "targets": ["bigarchive.7z"],
        "clean": True

Install doit and go:

$ pip install doit

$ doit list  # see list of tasks with one-line helpstring
compress    Compress input file(s)

$ doit  # run all default tasks
. compress

$ doit  # skip doing tasks with results being already uptodate
-- compress

$ doit clean  # clean created files
compress - removing file 'bigarchive.7z'

Indices and tables