This repository was archived by the owner on Sep 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 370
[WIP] VTK 7 recipe supporting both Python 2 & 3 #581
Open
grlee77
wants to merge
4
commits into
conda-archive:main
Choose a base branch
from
grlee77:vtk7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,13 @@ mkdir build | |
| cd build | ||
|
|
||
| if [ `uname` == Linux ]; then | ||
| CC=gcc44 | ||
| CXX=g++44 | ||
| PY_LIB="libpython${PY_VER}.so" | ||
| # Note: VTK 7 requires gcc >= 4.2 | ||
| CC=gcc | ||
| CXX=g++ | ||
|
|
||
| # use globs to take into account all possible suffixes: m, u, d | ||
| PY_LIB=`ls "${PREFIX}/lib/libpython${PY_VER}"*.so | head -n 1` | ||
| PY_INC=`ls -d "${PREFIX}/include/python${PY_VER}"* | head -n 1` | ||
|
|
||
| cmake .. \ | ||
| -DCMAKE_C_COMPILER=$CC \ | ||
|
|
@@ -21,26 +25,27 @@ if [ `uname` == Linux ]; then | |
| -DBUILD_SHARED_LIBS=ON \ | ||
| -DVTK_WRAP_PYTHON=ON \ | ||
| -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
| -DPYTHON_INCLUDE_PATH=${PREFIX}/include/python${PY_VER} \ | ||
| -DPYTHON_LIBRARY=${PREFIX}/lib/${PY_LIB} \ | ||
| -DPYTHON_INCLUDE_PATH=${PY_INC} \ | ||
| -DPYTHON_LIBRARY=${PY_LIB} \ | ||
| -DVTK_INSTALL_PYTHON_MODULE_DIR=${SP_DIR} \ | ||
| -DModule_vtkRenderingMatplotlib=ON \ | ||
| -DVTK_USE_X=ON | ||
| -DVTK_USE_X=ON \ | ||
| -DVTK_PYTHON_VERSION=${PY_VER:0:1} | ||
| fi | ||
|
|
||
| if [ `uname` == Darwin ]; then | ||
| CC=cc | ||
| CXX=c++ | ||
| PY_LIB="libpython${PY_VER}.dylib" | ||
| SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk" | ||
|
|
||
| # use globs to take into account various possble suffixes: m, u, d | ||
| PY_LIB=`ls ${PREFIX}/lib/libpython${PY_VER}*.dylib | head -n 1` | ||
| PY_INC=`ls -d ${PREFIX}/include/python${PY_VER}* | head -n 1` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you remove this option?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got the following warning during the build There did seem to still be places in the VTK 7 source code that check VTK_USE_TK, though, so I will go ahead and put it back in. It looks like the VTK_USE_CARBON flag can safely be removed as Carbon support was removed from VTK7. |
||
|
|
||
| cmake .. \ | ||
| -DCMAKE_C_COMPILER=$CC \ | ||
| -DCMAKE_CXX_COMPILER=$CXX \ | ||
| -DVTK_REQUIRED_OBJCXX_FLAGS='' \ | ||
| -DVTK_USE_CARBON=OFF \ | ||
| -DVTK_USE_TK=OFF \ | ||
| -DIOKit:FILEPATH=${SDK_PATH}/System/Library/Frameworks/IOKit.framework \ | ||
| -DVTK_USE_COCOA=ON \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_INSTALL_PREFIX="$PREFIX" \ | ||
|
|
@@ -52,11 +57,13 @@ if [ `uname` == Darwin ]; then | |
| -DBUILD_SHARED_LIBS=ON \ | ||
| -DVTK_WRAP_PYTHON=ON \ | ||
| -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
| -DPYTHON_INCLUDE_PATH=${PREFIX}/include/python${PY_VER} \ | ||
| -DPYTHON_LIBRARY=${PREFIX}/lib/${PY_LIB} \ | ||
| -DPYTHON_INCLUDE_PATH=${PY_INC} \ | ||
| -DPYTHON_LIBRARY=${PY_LIB} \ | ||
| -DVTK_INSTALL_PYTHON_MODULE_DIR=${SP_DIR} \ | ||
| -DModule_vtkRenderingMatplotlib=ON \ | ||
| -DVTK_USE_X=OFF | ||
| -DVTK_USE_X=OFF \ | ||
| -DVTK_PYTHON_VERSION=${PY_VER:0:1} | ||
|
|
||
| fi | ||
|
|
||
| make -j${CPU_COUNT} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave here gcc44 and g++44. Those are the versions we're using right now in centos5.