python package installation

This commit is contained in:
Christoph Wintersteiger 2014-10-08 13:35:16 +00:00
parent 42ea36b932
commit 65c21fd44b

View File

@ -32,8 +32,23 @@ if defined NETGENDIR (
)
)
if defined PYTHONROOT (
set PY_PACKAGE_FOLDER=%PYTHONROOT%\lib\site-packages\netgen
echo "%PYTHONROOT%\lib\site-packages\netgen"
echo %PY_PACKAGE_FOLDER%
if not exist "%PYTHONROOT%\lib\site-packages\netgen" (
mkdir "%PYTHONROOT%\lib\site-packages\netgen"
echo "%PY_PACKAGE_FOLDER%" created
)
) else (
echo Environment variable PYTHONTOOT not found
)
set NGLIB_LIBINC=%PROJ_DIR%..\nglib
set NGLIB_PYTHON_SOURCE=%PROJ_DIR%..\python
echo POSTBUILD Script for %PROJ_NAME% ........
@ -92,6 +107,17 @@ if errorlevel 1 goto LibInstallFailed
echo Installing %PROJ_NAME%.h: Completed OK!!
if defined PYTHONROOT (
REM *** Copy the python package into python\lib folder ***
echo Installing Python package
REM xcopy "%NGLIB_PYTHON_SOURCE%\__init__.py" "%PY_PACKAGE_FOLDER%\" /i /d /y
copy "%NGLIB_PYTHON_SOURCE%\__init__.py" "%PY_PACKAGE_FOLDER%\"
copy "%NGLIB_PYTHON_SOURCE%\csg.py" "%PY_PACKAGE_FOLDER%\"
copy "%NGLIB_PYTHON_SOURCE%\meshing.py" "%PY_PACKAGE_FOLDER%\"
if errorlevel 1 goto PythonPackageInstallFailed
echo Installing Python package: Completed OK!!
)
REM *** Clean up the build directory by deleting the OBJ files ***
REM echo Deleting the %PROJ_NAME% build folder %PROJ_DIR%%PROJ_NAME% ....
REM rmdir %PROJ_DIR%%PROJ_NAME% /s /q
@ -112,6 +138,9 @@ exit 1
:LibInstallFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Error copying %PROJ_NAME%.lib or %PROJ_NAME%.h into install folder!!!
exit 1
:PythonPackageInstallFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Error copying Python files into Python library folder!!!
exit 1
:ExternalInstallFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Error copying pthreadVC2.dll into install folder!!!
exit 1