File: cleanpy.sh

package info (click to toggle)
remrun 0.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 444 kB
  • sloc: python: 775; sh: 629; makefile: 55
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 -- '{}' +