Skip to content

Commit 52b2548

Browse files
authored
Makefile clean utility to remove cython cached objects (#881)
1 parent 7afd6d6 commit 52b2548

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,14 @@ test-coverage:
7171
poetry run coverage report -m --fail-under=90
7272
poetry run coverage html
7373
poetry run coverage xml
74+
75+
76+
clean:
77+
@echo "Cleaning up Cython and Python cached files"
78+
@rm -rf build dist *.egg-info
79+
@find . -name "*.so" -exec echo Deleting {} \; -delete
80+
@find . -name "*.pyc" -exec echo Deleting {} \; -delete
81+
@find . -name "__pycache__" -exec echo Deleting {} \; -exec rm -rf {} +
82+
@find . -name "*.pyd" -exec echo Deleting {} \; -delete
83+
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
84+
@echo "Cleanup complete"

mkdocs/docs/contributing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ In contrast to the name suggest, it doesn't run the checks on the commit. If thi
8888

8989
You can bump the integrations to the latest version using `pre-commit autoupdate`. This will check if there is a newer version of `{black,mypy,isort,...}` and update the yaml.
9090

91+
## Cleaning
92+
93+
Removal of old cached files generated during the Cython build process:
94+
95+
```bash
96+
make clean
97+
```
98+
99+
Helps prevent build failures and unexpected behavior by removing outdated files, ensuring that only up-to-date sources are used & the build environment is always clean.
100+
91101
## Testing
92102

93103
For Python, `pytest` is used a testing framework in combination with `coverage` to enforce 90%+ code coverage.

0 commit comments

Comments
 (0)