Created
May 10, 2023 05:44
-
-
Save eddy-22/6b82457cb67564c0b12963a2a54a5a6d to your computer and use it in GitHub Desktop.
Example Makefile or Justfile rules for cleaning Python projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts | |
clean-build: ## remove build artifacts | |
rm -fr build/ | |
rm -fr dist/ | |
rm -fr .eggs/ | |
find . -name '*.egg-info' -exec rm -fr {} + | |
find . -name '*.egg' -exec rm -f {} + | |
clean-pyc: ## remove Python file artifacts | |
find . -name '*.pyc' -exec rm -f {} + | |
find . -name '*.pyo' -exec rm -f {} + | |
find . -name '*~' -exec rm -f {} + | |
find . -name '__pycache__' -exec rm -fr {} + | |
clean-test: ## remove test and coverage artifacts | |
rm -fr .tox/ | |
rm -f .coverage | |
rm -fr htmlcov/ | |
rm -fr .pytest_cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment