| 1 |
# -*- coding: UTF-8 -*- |
| 2 |
""" |
| 3 |
Provides cleanup tasks for this project. |
| 4 |
Mostly reuses tasks from "invoke_tasklet_clean". |
| 5 |
""" |
| 6 |
|
| 7 |
from __future__ import absolute_import |
| 8 |
from ._tasklet_cleanup import cleanup_tasks |
| 9 |
|
| 10 |
|
| 11 |
# ----------------------------------------------------------------------------- |
| 12 |
# TASKS: |
| 13 |
# ----------------------------------------------------------------------------- |
| 14 |
# INHERITED-FROM: _invoke_tasklet_clean |
| 15 |
# pylint: disable=unused-import |
| 16 |
from ._tasklet_cleanup import clean, clean_all, clean_python, namespace |
| 17 |
|
| 18 |
|
| 19 |
# -- EXTENSTION-POINT: CLEANUP TASKS (called by: "clean" task): |
| 20 |
cleanup_tasks.add_task(clean_python) |
| 21 |
|
| 22 |
|
| 23 |
# ----------------------------------------------------------------------------- |
| 24 |
# TASK CONFIGURATION: |
| 25 |
# ----------------------------------------------------------------------------- |
| 26 |
# namespace = Collection(clean, clean_all) |
| 27 |
# namespace.configure({ |
| 28 |
# "clean": { |
| 29 |
# "directories": [], |
| 30 |
# "files": [ |
| 31 |
# "*.bak", "*.log", "*.tmp", |
| 32 |
# "**/.DS_Store", "**/*.~*~", # -- MACOSX |
| 33 |
# ], |
| 34 |
# "extra_directories": [], |
| 35 |
# "extra_files": [], |
| 36 |
# }, |
| 37 |
# "clean_all": { |
| 38 |
# "directories": [".venv*", ".tox", "downloads", "tmp"], |
| 39 |
# "files": [], |
| 40 |
# "extra_directories": [], |
| 41 |
# "extra_files": [], |
| 42 |
# }, |
| 43 |
# }) |
| 44 |
# |
| 45 |
# ----------------------------------------------------------------------------- |
| 46 |
# TASK CONFIGURATION HELPERS: Can be used from other task modules |
| 47 |
# ----------------------------------------------------------------------------- |
| 48 |
# def config_add_cleanup_dirs(directories): |
| 49 |
# cleanup_directories = namespace._configuration["clean"]["directories"] |
| 50 |
# cleanup_directories.extend(directories) |
| 51 |
# |
| 52 |
# def config_add_cleanup_files(files): |
| 53 |
# cleanup_files = namespace._configuration["clean"]["files"] |
| 54 |
# cleanup_files.extend(files) |