Skip to content

Commit

Permalink
Simplify Azure Python cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham authored Jun 29, 2024
1 parent 19d64de commit 032ac08
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions recipe/build_base.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,9 @@ if "%CI%" == "azure" (
:: Hack to try removing problematic Python from Azure CI image
:: Replace with conda-smithy solution when available
:: xref: https://github.com/conda-forge/conda-smithy/pull/1966
set CLEANUP_DIRS=^
C:\hostedtoolcache\windows\Python;^
;

mkdir C:\empty
for %%f in (%CLEANUP_DIRS:;= %) do (
if not [%%f] == [] (
echo Removing %%f
dir %%f
robocopy /purge /r:0 /w:0 /mt /ns /nc /np /nfl /ndl /njh /njs C:\empty %%f > nul 2>&1
rmdir /q %%f
)
)
robocopy /purge /r:0 /w:0 /mt /ns /nc /np /nfl /ndl /njh /njs C:\empty C:\hostedtoolcache\windows\Python > nul 2>&1
rmdir /q C:\hostedtoolcache\windows\Python
rmdir /q C:\empty
)

Expand Down

0 comments on commit 032ac08

Please sign in to comment.