File: cleanpy.sh

package info (click to toggle)
python-test-stages 0.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 304 kB
  • sloc: python: 792; sh: 24; makefile: 9
file content (17 lines) | stat: -rwxr-xr-x 495 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
#
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

set -e

find . -mindepth 1 -maxdepth 1 -type d \( \
	-name '.tox' \
	-or -name '.mypy_cache' \
	-or -name '.pytest_cache' \
	-or -name '.nox' \
	-or -name '.ruff_cache' \
\) -exec rm -rf -- '{}' +
find . -type d -name '__pycache__' -exec rm -rfv -- '{}' +
find . -type f -name '*.pyc' -delete -print
find . -mindepth 1 -maxdepth 2 -type d -name '*.egg-info' -exec rm -rfv -- '{}' +