copy setup.cfg.template setup.cfg
if errorlevel 1 exit 1

set INCLUDE=%LIBRARY_INC%;%LIBRARY_INC%\freetype2;%INCLUDE%
set LIB=%LIBRARY_LIB%;%PREFIX%\tcl;%LIB%
set LIBPATH=%LIBRARY_LIB%;%LIBPATH%
REM %INCLUDE%

REM Matplotlib goes looking for this
REM %LIBRARY_LIB%
copy %LIBRARY_LIB%\libpng16.lib %LIBRARY_LIB%\png.lib

if not exist %SP_DIR%\matplotlib\backends\web_backend\jquery-ui-1.12.1 md %SP_DIR%\matplotlib\backends\web_backend\jquery-ui-1.12.1
if errorlevel 1 exit 1
xcopy /s /e /q /y jquery-ui-1.12.1 %SP_DIR%\matplotlib\backends\web_backend\jquery-ui-1.12.1\
if errorlevel 1 exit 1

%PYTHON% setup.py install --old-and-unmanageable
if errorlevel 1 exit 1
%PYTHON% %RECIPE_DIR%\fix_version_string.py
if errorlevel 1 exit 1

del %SP_DIR%\*.pth 2>nul
del /F /S /Q %SP_DIR%\dateutil 2>nul
del /F /S /Q %SP_DIR%\numpy 2>nul
del /F /S /Q %SP_DIR%\__pycache__ 2>nul
del /F /S /Q %SP_DIR%\PyQt5 2>nul
