Skip to content

Commit

Permalink
Update files removed in build_lib.bat
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
ischoegl committed Aug 11, 2022
1 parent 68448f7 commit 2f6f653
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cantera/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SET /A CPU_USE=%CPU_COUNT% / 2
IF %CPU_USE% EQU 0 SET CPU_USE=1

SET "ESC_PREFIX=%PREFIX:\=/%"
ECHO prefix="%ESC_PREFIX%/Library" >> cantera.conf
ECHO prefix="%ESC_PREFIX%" >> cantera.conf
ECHO boost_inc_dir="%ESC_PREFIX%/Library/include" >> cantera.conf

CALL scons build -j%CPU_USE%
Expand Down
14 changes: 10 additions & 4 deletions cantera/build_lib.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ echo "****************************"
echo "DELETING files from devel except shared libraries and data"
echo "****************************"

rd /s /q %PREFIX%\Library\share\cantera\doc
rd /s /q %PREFIX%\Library\share\cantera\samples
rd /s /q %PREFIX%\Library\share\man
rd /s /q %PREFIX%\Library\share
rd /s /q %PREFIX%\share\cantera\doc
rd /s /q %PREFIX%\share\cantera\samples
rd /s /q %PREFIX%\share\man
rd /s /q %PREFIX%\Library\include\cantera
rd /s /q %PREFIX%\Scripts
del /f %PREFIX%\Library\lib\cantera.lib
del /f %PREFIX%\Library\lib\cantera_shared.lib

echo "****************************"
echo "DELETING files COMPLETED"
echo "****************************"
2 changes: 1 addition & 1 deletion cantera/build_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf $PREFIX/share/cantera/samples
rm -rf $PREFIX/share/man
rm -rf $PREFIX/include/cantera
rm -rf $PREFIX/bin
rm -rf $PREFIX/lib/pkg-config
rm -rf $PREFIX/lib/pkgconfig
rm -rf $PREFIX/lib/libcantera.a

if [[ "$target_platform" == osx-* ]]; then
Expand Down
21 changes: 12 additions & 9 deletions cantera/build_py.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ echo ****************************
echo PYTHON %PYTHON% BUILD STARTED
echo ****************************

COPY cantera.conf cantera.conf.bak
DEL /F cantera.conf
FINDSTR /V "python_package" cantera.conf.bak > cantera.conf
DEL /F cantera.conf.bak
:: Remove old Python build files, if they are present
IF EXIST "build/python" RD /S /Q "build/python"
IF EXIST "build/temp-py" RD /S /Q "build/temp-py"
IF EXIST "%PREFIX%/bin/ck2yaml" DEL /F "%PREFIX%/bin/ck2yaml"
IF EXIST "%PREFIX%/bin/cti2yaml" DEL /F "%PREFIX%/bin/cti2yaml"
IF EXIST "%PREFIX%/bin/ctml2yaml" DEL /F "%PREFIX%/bin/ctml2yaml"
IF EXIST "%PREFIX%/bin/yaml2ck" DEL /F "%PREFIX%/bin/yaml2ck"

ECHO python_package='full' >> cantera.conf
SET "ESC_PYTHON=%PYTHON:\=/%"
ECHO python_cmd="%ESC_PYTHON%" >> cantera.conf
CALL scons build

CALL scons build python_package=y
IF ERRORLEVEL 1 EXIT 1

"%PYTHON%" -m pip install --no-deps --no-index --find-links=build\python\dist\ cantera
IF ERRORLEVEL 1 EXIT 1

echo ****************************
echo PYTHON %PYTHON% BUILD COMPLETED SUCCESSFULLY
echo ****************************

"%PYTHON%" -m pip install --no-deps --no-index --find-links=build\python\dist\ cantera
IF ERRORLEVEL 1 EXIT 1

0 comments on commit 2f6f653

Please sign in to comment.