source: trunk/external/build_externals/build/assimulo/makefile @ 12172

Last change on this file since 12172 was 12172, checked in by randersson, 12 months ago

#5693 Merged changes for assimulo wheel version number from branch to trunk since version is now set automatically.

File size: 2.7 KB
Line 
1
2include default_config
3include $(USER_CONFIG)
4
5.PHONY: wheel folder
6
7test:
8        nosetests tests/*.pyc tests/solvers/*.pyc
9
10test_wheel: $(INSTALL_DIR_FOLDER)/$(subst test_,,$@)
11        @pip install $(INSTALL_DIR_FOLDER)/$(subst test_,,$@)/*.whl
12        nosetests $(WHEEL_INSTALL_DIR)/tests/*.pyc $(WHEEL_INSTALL_DIR)/tests/solvers/*.pyc
13
14test_folder: $(INSTALL_DIR_FOLDER)/$(subst test_,,$@)
15        nosetests $(ASSIMULO_FOLDER_INSTALL_DIR)/tests/*.pyc $(ASSIMULO_FOLDER_INSTALL_DIR)/tests/solvers/*.pyc
16
17folder: $(INSTALL_DIR_FOLDER)/folder
18
19$(INSTALL_DIR_FOLDER)/folder:
20        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/folder_build)
21        mkdir -p $(TARGET_BUILD_DIR)
22        @$(eval TARGET_INSTALL_DIR=$(BUILD_DIR)/folder_install)
23        mkdir -p $(TARGET_INSTALL_DIR)
24        mkdir -p $@
25
26        cd $(ASSIMULO_SRC) && \
27        find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - | tar x -C $(TARGET_BUILD_DIR)
28        cd $(TARGET_BUILD_DIR); \
29        $(PYTHONHOME)python setup.py 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)
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)
34
35wheel: $(INSTALL_DIR_FOLDER)/wheel
36
37$(INSTALL_DIR_FOLDER)/wheel:
38        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/wheel_build)
39        mkdir -p $(TARGET_BUILD_DIR)
40        mkdir -p $@
41        cd $(ASSIMULO_SRC) && \
42        find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - -f - | tar x -C $(TARGET_BUILD_DIR)
43        cd $(TARGET_BUILD_DIR); \
44        $(PYTHONHOME)python setup.py bdist_wheel --superlu-home=$(SUPERLU_HOME) --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(BLAS_HOME) --lapack-home=$(LAPACK_HOME) $(EXTRA_SETUP_ARGS); \
45        find -type f -name Assimulo*.whl -exec cp {} $@/ \;
46        rm -rf $(TARGET_BUILD_DIR)
47
48clean:
49        rm -rf $(BUILD_DIR)
50
51#
52#       Copyright (C) 2018 Modelon AB
53#
54#       This program is free software: you can redistribute it and/or modify
55#       it under the terms of the GNU General Public License version 3 as published
56#       by the Free Software Foundation, or optionally, under the terms of the
57#       Common Public License version 1.0 as published by IBM.
58#
59#       This program is distributed in the hope that it will be useful,
60#       but WITHOUT ANY WARRANTY; without even the implied warranty of
61#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62#       GNU General Public License, or the Common Public License, for more details.
63#
64#       You should have received copies of the GNU General Public License
65#       and the Common Public License along with this program.  If not,
66#       see <http://www.gnu.org/licenses/> or
67#       <http://www.ibm.com/developerworks/library/os-cpl.html/> respectively.
Note: See TracBrowser for help on using the repository browser.