Changeset 13802


Ignore:
Timestamp:
Oct 22, 2019 2:36:13 PM (3 weeks ago)
Author:
randersson
Message:

#5819 Fixed such that assimulo uses assimulo makefile instead of directly calling setup.py

Location:
branches/dev-5819
Files:
6 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Makefile.am

    r13800 r13802  
    5555
    5656if BUILD_WITH_PYTHON32
    57 BUILD_WITH_PYTHON32_ARG=--force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2"
     57BUILD_WITH_PYTHON32_ARG=--force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2"
     58ASSIMULO_CONFIG=win32_msys_py2
    5859DEP_SUFFIX=
    5960else
    6061BUILD_WITH_PYTHON32_ARG=
    6162DEP_SUFFIX=64
     63ASSIMULO_CONFIG=win64_msys_py3
    6264endif
    6365
     
    6668if WITH_OPENMP
    6769    mkdir -p $(assimulo_build_dir); \
    68     cd $(assimulo_src_dir)/..; \
    69     find Assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(assimulo_build_dir); \
    70     cd $(assimulo_build_dir)/Assimulo; \
     70    cd $(assimulo_src_dir)/../build_externals/build/assimulo; \
    7171    case $(build) in \
    7272    *-cygwin*) \
    73     python setup.py install --with_openmp=True --superlu-home=$(abs_builddir)/superlu_build$(DEP_SUFFIX)/ --sundials-home=$(SUNDIALS_HOME)$(DEP_SUFFIX) --sundials-with-superlu=True --blas-home=$(abs_builddir)/blas_install$(DEP_SUFFIX)/ --lapack-home=$(abs_builddir)/lapack_install$(DEP_SUFFIX)/ $(BUILD_WITH_PYTHON32_ARG) --prefix=$(assimulo_install_dir) ;; \
     73    make install USER_CONFIG=../../configurations/Assimulo/windows/win32_cygwin_py2 JM_HOME=$(abs_top_srcdir) BUILD_DIR=$(abs_builddir);; \
    7474    *-mingw*) \
    75     python setup.py install --with_openmp=True --superlu-home=$(abs_builddir)/superlu_build$(DEP_SUFFIX)/ --sundials-home=$(SUNDIALS_HOME)$(DEP_SUFFIX) --sundials-with-superlu=True --blas-home=$(abs_builddir)/blas_install$(DEP_SUFFIX)/ --lapack-home=$(abs_builddir)/lapack_install$(DEP_SUFFIX)/ $(BUILD_WITH_PYTHON32_ARG) $(NUMPY_NO_MSVCR_ARG) --prefix=$(assimulo_install_dir) ;; \
     75    make install USER_CONFIG=../../configurations/Assimulo/windows/$(ASSIMULO_CONFIG) JM_HOME=$(abs_top_srcdir) BUILD_DIR=$(abs_builddir) ;; \
    7676    *) \
    77     python setup.py install --with_openmp=True --superlu-home=$(abs_builddir)/superlu_build/ --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(abs_builddir)/blas_install/ --lapack-home=$(abs_builddir)/lapack_install/ --prefix=$(assimulo_install_dir) ;; \
     77    make install USER_CONFIG=../../configurations/Assimulo/unix/config JM_HOME=$(abs_top_srcdir) BUILD_DIR=$(abs_builddir);; \
    7878    esac
    7979if JM_WIN64
     
    8282    cd $(assimulo_src_dir)/..; \
    8383    find Assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(assimulo_build_dir64); \
    84     cd $(assimulo_build_dir)/Assimulo; \
     84    cd $(assimulo_build_dir64)/Assimulo; \
    8585    export PATH=$(PYTHON64_HOME):$(PYTHON64_HOME)/Scripts:$(PYTHON64_HOME)/Lib:"${PATH}"; \
    8686    export PYTHONHOME=$(PYTHON64_HOME); \
     
    213213endif
    214214endif
    215     for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib/python3.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 lib64/python3.7 Lib; do \
    216     if [ -e $(assimulo_install_dir)/$${pkgdir}/site-packages/ ]; \
    217     then \
    218     cd $(assimulo_install_dir)/$${pkgdir}/site-packages/; \
    219     find assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python; \
    220     fi; \
    221     done
    222215    for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib/python3.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 lib64/python3.7 Lib; do \
    223216    if [ -e $(pymodelica_install_dir)/$${pkgdir}/site-packages/ ]; \
  • branches/dev-5819/Makefile.in

    r13800 r13802  
    353353CMAKE_CASADI_COMPILER_ARGS64 = -m64 -fpermissive
    354354@BUILD_WITH_PYTHON32_FALSE@BUILD_WITH_PYTHON32_ARG =
    355 @BUILD_WITH_PYTHON32_TRUE@BUILD_WITH_PYTHON32_ARG = --force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2" 
     355@BUILD_WITH_PYTHON32_TRUE@BUILD_WITH_PYTHON32_ARG = --force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2"
    356356@BUILD_WITH_PYTHON32_FALSE@DEP_SUFFIX = 64
    357357@BUILD_WITH_PYTHON32_TRUE@DEP_SUFFIX =
     
    362362@BUILD_WITH_PYTHON32_FALSE@TMP_CMAKE_CASADI_CXX_FLAG = $(CMAKE_CASADI_CXX_FLAG64)
    363363@BUILD_WITH_PYTHON32_TRUE@TMP_CMAKE_CASADI_CXX_FLAG = $(CMAKE_CASADI_CXX_FLAG)
     364@BUILD_WITH_PYTHON32_FALSE@TMP_CMAKE_CASADI_ARGS = $(CMAKE_CASADI_ARGS64)
     365@BUILD_WITH_PYTHON32_TRUE@TMP_CMAKE_CASADI_ARGS = $(CMAKE_CASADI_ARGS)
    364366@BUILD_WITH_PYTHON32_FALSE@TMP_CMAKE_CASADI_COMPILER_ARGS = $(CMAKE_CASADI_COMPILER_ARGS64)
    365367@BUILD_WITH_PYTHON32_TRUE@TMP_CMAKE_CASADI_COMPILER_ARGS = $(CMAKE_CASADI_COMPILER_ARGS)
     
    376378@BUILD_WITH_PYTHON32_FALSE@TMP_MC_BUILD = $(MC_BUILD64)
    377379@BUILD_WITH_PYTHON32_TRUE@TMP_MC_BUILD = $(MC_BUILD)
    378 
    379 #CMAKE_PYTHON_INCLUDE=$(CMAKE_PYTHON64_INCLUDE)
    380 #CMAKE_PYTHON_LIB=$(CMAKE_PYTHON_LIB64)
    381 @BUILD_WITH_PYTHON32_FALSE@TMP_CMAKE_CASADI_ARGS = $(CMAKE_CASADI_ARGS64)
    382 @BUILD_WITH_PYTHON32_TRUE@TMP_CMAKE_CASADI_ARGS = $(CMAKE_CASADI_ARGS)
    383380@NUMPY_NO_MSVCR_FALSE@NUMPY_NO_MSVCR_ARG =
    384381@NUMPY_NO_MSVCR_TRUE@NUMPY_NO_MSVCR_ARG = --no-msvcr="true"
     382@BUILD_WITH_PYTHON32_FALSE@ASSIMULO_CONFIG = win64_msys_py3
     383@BUILD_WITH_PYTHON32_TRUE@ASSIMULO_CONFIG = win32_msys_py2
    385384
    386385# Hooks for extra build or install actions. Must be empty or the path of a shell script to execute.
     
    929928@COMPILE_WITH_IPOPT64_TRUE@ export PYTHONHOME=$(PYTHON64_HOME); 
    930929@COMPILE_WITH_IPOPT64_TRUE@ cd $(abs_builddir)/ThirdParty/CasADi; \
    931 @COMPILE_WITH_IPOPT64_TRUE@ make -f Makefile install "SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR)" "CASADI_BUILD_DIR=$(CASADI_BUILD_DIR64)" "IPOPT_HOME=$(IPOPT64_HOME)"
     930@COMPILE_WITH_IPOPT64_TRUE@ make -f Makefile install "SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR64)" "CASADI_BUILD_DIR=$(CASADI_BUILD_DIR64)" "IPOPT_HOME=$(IPOPT64_HOME)"
    932931@COMPILE_WITH_IPOPT64_TRUE@ mkdir -p $(DESTDIR)$(prefix)/Python/
    933932@COMPILE_WITH_IPOPT64_TRUE@ cp -r $(CASADI_PYTHON_INST_DIR64)/casadi $(DESTDIR)$(prefix)/Python_64/
     
    10641063
    10651064clean-casadi-interface:
    1066     rm -rf $(MC_BUILD)
     1065    rm -rf $(TMP_MC_BUILD)
    10671066    rm -rf $(MC_BUILD64)
    10681067#   rm -rf $(DESTDIR)$(prefix)/Python/casadi
     
    10751074build-python-packages:
    10761075@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ mkdir -p $(assimulo_build_dir); \
    1077 @PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ cd $(assimulo_src_dir)/..; \
    1078 @PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ find Assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(assimulo_build_dir); \
    1079 @PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ cd $(assimulo_build_dir)/Assimulo; \
     1076@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ cd $(assimulo_src_dir)/../build_externals/build/assimulo; \
    10801077@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ case $(build) in \
    10811078@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ *-cygwin*) \
    1082 @PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ python setup.py install --with_openmp=True --superlu-home=$(abs_builddir)/superlu_build$(DEP_SUFFIX)/ --sundials-home=$(SUNDIALS_HOME)$(DEP_SUFFIX) --sundials-with-superlu=True --blas-home=$(abs_builddir)/blas_install$(DEP_SUFFIX)/ --lapack-home=$(abs_builddir)/lapack_install$(DEP_SUFFIX)/ $(BUILD_WITH_PYTHON32_ARG) --prefix=$(assimulo_install_dir) ;; \
     1079@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ make install USER_CONFIG=../../configurations/Assimulo/windows/win32_cygwin_py2 JM_HOME=$(abs_top_srcdir) BUILD_DIR=$(abs_builddir);; \
    10831080@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ *-mingw*) \
    1084 @PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ python setup.py install --with_openmp=True --superlu-home=$(abs_builddir)/superlu_build$(DEP_SUFFIX)/ --sundials-home=$(SUNDIALS_HOME)$(DEP_SUFFIX) --sundials-with-superlu=True --blas-home=$(abs_builddir)/blas_install$(DEP_SUFFIX)/ --lapack-home=$(abs_builddir)/lapack_install$(DEP_SUFFIX)/ $(BUILD_WITH_PYTHON32_ARG) $(NUMPY_NO_MSVCR_ARG) --prefix=$(assimulo_install_dir) ;; \
     1081@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ make install USER_CONFIG=../../configurations/Assimulo/windows/$(ASSIMULO_CONFIG) JM_HOME=$(abs_top_srcdir) BUILD_DIR=$(abs_builddir) ;; \
    10851082@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ *) \
    1086 @PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ python setup.py install --with_openmp=True --superlu-home=$(abs_builddir)/superlu_build/ --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(abs_builddir)/blas_install/ --lapack-home=$(abs_builddir)/lapack_install/ --prefix=$(assimulo_install_dir) ;; \
     1083@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ make install USER_CONFIG=../../configurations/Assimulo/unix/config JM_HOME=$(abs_top_srcdir) BUILD_DIR=$(abs_builddir);; \
    10871084@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@ esac
    10881085@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  mkdir -p $(assimulo_build_dir64); \
    10891086@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  cd $(assimulo_src_dir)/..; \
    10901087@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  find Assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(assimulo_build_dir64); \
    1091 @JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  cd $(assimulo_build_dir)/Assimulo; \
     1088@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  cd $(assimulo_build_dir64)/Assimulo; \
    10921089@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  export PATH=$(PYTHON64_HOME):$(PYTHON64_HOME)/Scripts:$(PYTHON64_HOME)/Lib:"${PATH}"; \
    10931090@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_OPENMP_TRUE@@WITH_PYTHON64_TRUE@  export PYTHONHOME=$(PYTHON64_HOME); \
     
    11881185@JM_WIN64_TRUE@@PYTHON_ENABLED_TRUE@@WITH_PYTHON64_TRUE@    [ $(abs_top_srcdir) == $(DESTDIR)$(prefix) ] && echo "Installing in dist directory, don't copy LICENSE file" || cp $(abs_top_srcdir)/Python/LICENSE $(DESTDIR)$(prefix)/Python_64
    11891186@PYTHON_ENABLED_TRUE@   for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib/python3.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 lib64/python3.7 Lib; do \
    1190 @PYTHON_ENABLED_TRUE@   if [ -e $(assimulo_install_dir)/$${pkgdir}/site-packages/ ]; \
    1191 @PYTHON_ENABLED_TRUE@   then \
    1192 @PYTHON_ENABLED_TRUE@   cd $(assimulo_install_dir)/$${pkgdir}/site-packages/; \
    1193 @PYTHON_ENABLED_TRUE@   find assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python; \
    1194 @PYTHON_ENABLED_TRUE@   fi; \
    1195 @PYTHON_ENABLED_TRUE@   done
    1196 @PYTHON_ENABLED_TRUE@   for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib/python3.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 lib64/python3.7 Lib; do \
    11971187@PYTHON_ENABLED_TRUE@   if [ -e $(pymodelica_install_dir)/$${pkgdir}/site-packages/ ]; \
    11981188@PYTHON_ENABLED_TRUE@   then \
  • branches/dev-5819/MakefileCasadi.am

    r13800 r13802  
    5151
    5252if BUILD_WITH_PYTHON32
    53 BUILD_WITH_PYTHON32_ARG=--force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2"
    54 DEP_SUFFIX=
    5553TMP_CASADI_BUILD_DIR=$(CASADI_BUILD_DIR)
    5654TMP_SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR)
     
    6664
    6765else
    68 BUILD_WITH_PYTHON32_ARG=
    69 DEP_SUFFIX=64
    7066TMP_CASADI_BUILD_DIR=$(CASADI_BUILD_DIR64)
    7167TMP_SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR64)
  • branches/dev-5819/external/build_externals/build/assimulo/default_config

    r13785 r13802  
    11OS=win
    22TARGET=assimulo
    3 BUILD_DIR=${SDK_HOME}/build
     3BUILD_DIR=${WORKSPACE}/build
     4BITNESS=64
     5PREINSTALL_DIR=$(BUILD_DIR)/Assimulo_install$(BITNESS)
    46
    5 JM_HOME=${SDK_HOME}/src
     7JM_HOME=${WORKSPACE}/src
    68ASSIMULO_SRC=$(JM_HOME)/external/Assimulo
    79SUPERLU_HOME=$(BUILD_DIR)/superlu_install
     
    911BLAS_HOME=$(BUILD_DIR)/blas_install
    1012LAPACK_HOME=$(BUILD_DIR)/lapack_install
    11 MKL_HOME=
     13
    1214INSTALL_DIR_FOLDER=${SDK_HOME}/install/Python
    1315PLATFORM_SITE_PACKAGES=Lib/site-packages
    14 BITNESS=64
     16
    1517BUILD_SETUP_EXTRA=
     18MKL_HOME=
  • branches/dev-5819/external/build_externals/build/assimulo/makefile

    r13785 r13802  
    1515    nosetests $(ASSIMULO_FOLDER_INSTALL_DIR)/tests/*.pyc $(ASSIMULO_FOLDER_INSTALL_DIR)/tests/solvers/*.pyc
    1616
    17 folder: $(INSTALL_DIR_FOLDER)/folder
     17folder: $(PREINSTALL_DIR)
    1818
    19 $(INSTALL_DIR_FOLDER)/folder:
    20     @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/folder_build)
     19$(PREINSTALL_DIR):
     20    @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/Assimulo_build$(BITNESS))
    2121    mkdir -p $(TARGET_BUILD_DIR)
    22     @$(eval TARGET_INSTALL_DIR=$(BUILD_DIR)/folder_install)
    23     mkdir -p $(TARGET_INSTALL_DIR)
    2422    mkdir -p $@
    2523
     
    2725    find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - | tar x -C $(TARGET_BUILD_DIR)
    2826    cd $(TARGET_BUILD_DIR); \
    29     $(PYTHONHOME)python setup.py $(BUILD_SETUP_EXTRA) install --superlu-home=$(SUPERLU_HOME) --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(BLAS_HOME) --lapack-home=$(LAPACK_HOME) $(EXTRA_SETUP_ARGS) --prefix=$(TARGET_INSTALL_DIR) --mkl-home=$(MKL_HOME)
    30    
    31     cd $(TARGET_INSTALL_DIR)/$(PLATFORM_SITE_PACKAGES); \
    32     find $(TARGET_INSTALL_DIR)/$(PLATFORM_SITE_PACKAGES) -type d -name assimulo -exec cp -r {} $@/ \;
    33     rm -rf $(TARGET_BUILD_DIR) $(TARGET_INSTALL_DIR)
     27    $(PYTHONHOME)python setup.py $(BUILD_SETUP_EXTRA) install --superlu-home=$(SUPERLU_HOME) --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(BLAS_HOME) --lapack-home=$(LAPACK_HOME) $(EXTRA_SETUP_ARGS) --prefix=$@ --mkl-home=$(MKL_HOME)
     28
     29install: folder
     30    cd $(PREINSTALL_DIR); \
     31    find $(PREINSTALL_DIR) -type d -name assimulo -exec cp -r {} $(INSTALL_DIR_FOLDER)/ \;
     32    rm -rf $(TARGET_BUILD_DIR) $(PREINSTALL_DIR)
    3433
    3534wheel: $(INSTALL_DIR_FOLDER)/wheel
  • branches/dev-5819/external/build_externals/configurations/Assimulo/windows/win32

    r12089 r13802  
    2727BLAS_HOME=$(BUILD_DIR)/blas_install32
    2828LAPACK_HOME=$(BUILD_DIR)/lapack_install32
    29 INSTALL_DIR_FOLDER=${SDK_HOME}/install/Python
     29INSTALL_DIR_FOLDER=${WORKSPACE}/install/Python
    3030# Optional variables
    31 PYTHONHOME=${SDK_HOME}/Python27/Python_32/
     31PYTHONHOME=${WORKSPACE}/Python27/Python_32/
  • branches/dev-5819/external/build_externals/configurations/Assimulo/windows/win64py3

    r13772 r13802  
    2424EXTRA_SETUP_ARGS=--with_openmp=True
    2525
    26 INSTALL_DIR_FOLDER=${SDK_HOME}/install/Python_64
    2726SUPERLU_HOME=$(BUILD_DIR)/superlu_install64
    2827SUNDIALS_HOME=$(BUILD_DIR)/sundials_install64
    2928BLAS_HOME=$(BUILD_DIR)/blas_install64
    3029LAPACK_HOME=$(BUILD_DIR)/lapack_install64
    31 INSTALL_DIR_FOLDER=${SDK_HOME}/install/Python_64
     30INSTALL_DIR_FOLDER=${WORKSPACE}/install/Python
    3231
    3332BUILD_SETUP_EXTRA=build_ext --compiler=msvc --fcompiler=intelvem
    34 PYTHONHOME=$(SDK_HOME)/Python37/
     33PYTHONHOME=$(WORKSPACE)/Python37/
Note: See TracChangeset for help on using the changeset viewer.