| 1 |
@echo off |
| 2 |
REM This script was copied from PythonQwt project |
| 3 |
REM ====================================================== |
| 4 |
REM Clean up repository |
| 5 |
REM ====================================================== |
| 6 |
REM Licensed under the terms of the MIT License |
| 7 |
REM Copyright (c) 2020 Pierre Raybaut |
| 8 |
REM (see PythonQwt LICENSE file for more details) |
| 9 |
REM ====================================================== |
| 10 |
call %~dp0utils GetScriptPath SCRIPTPATH |
| 11 |
call %FUNC% GetLibName LIBNAME |
| 12 |
call %FUNC% GetModName MODNAME |
| 13 |
cd %SCRIPTPATH%\..\ |
| 14 |
|
| 15 |
@REM Removing files/directories related to Python/doc build process |
| 16 |
if exist %LIBNAME%.egg-info ( rmdir /s /q %LIBNAME%.egg-info ) |
| 17 |
if exist %MODNAME%.egg-info ( rmdir /s /q %MODNAME%.egg-info ) |
| 18 |
if exist MANIFEST ( del /q MANIFEST ) |
| 19 |
if exist build ( rmdir /s /q build ) |
| 20 |
if exist dist ( rmdir /s /q dist ) |
| 21 |
if exist doc\_build ( rmdir /s /q doc\_build ) |
| 22 |
|
| 23 |
@REM Removing cache files/directories related to Python execution |
| 24 |
del /s /q *.pyc 1>nul 2>&1 |
| 25 |
del /s /q *.pyo 1>nul 2>&1 |
| 26 |
FOR /d /r %%d IN ("__pycache__") DO @IF EXIST "%%d" rd /s /q "%%d" |
| 27 |
|
| 28 |
@REM Removing directories related to public repository upload |
| 29 |
set TEMP=%SCRIPTPATH%\..\..\%LIBNAME%_temp |
| 30 |
set PUBLIC=%SCRIPTPATH%\..\..\%LIBNAME%_public |
| 31 |
if exist %TEMP% ( rmdir /s /q %TEMP% ) |
| 32 |
if exist %PUBLIC% ( rmdir /s /q %PUBLIC% ) |
| 33 |
|
| 34 |
@REM Removing files/directories related to Coverage |
| 35 |
if exist .coverage ( del /q .coverage ) |
| 36 |
if exist coverage.xml ( del /q coverage.xml ) |
| 37 |
if exist htmlcov ( rmdir /s /q htmlcov ) |
| 38 |
del /q .coverage.* 1>nul 2>&1 |
| 39 |
if exist sitecustomize.py ( del /q sitecustomize.py ) |