-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
VTK 7 (py2 and py3) #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
VTK 7 (py2 and py3) #453
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f578c3a
Added initial VTK recipe.
Korijn f4c9d0c
Switched from mesa requirement to freeglut, added yum requirements an…
Korijn a57a488
Added skip for OS X
Korijn dc14a06
typo
Korijn f0ec411
Removed superfluous --clean-first
Korijn 543c4e6
Typo
Korijn f458b6c
Typo
Korijn 914a346
Removed all --clean-first
Korijn 532bce6
Updated meta.yaml to include maintainers, more detailed license and s…
Korijn aa972ca
whitespace
EelcoHoogendoorn 8ba601b
removed gcc compiler spec
EelcoHoogendoorn cb815ce
build cleanup
EelcoHoogendoorn ea796ff
review comments
EelcoHoogendoorn f1b22b2
case sensitive?
EelcoHoogendoorn f0c23f2
Trying to use NMake instead
ivoflipse 0b0ce99
Make install for osx and linux
Korijn 9c692d1
Harmonized linux and windows recipes
Korijn 8566cd7
Corrected cmake option types
Korijn 873c312
%PY_VER% -> ${PY_VER} for build.sh, duh
Korijn 0097caa
Skip windows and OS X
Korijn 4871137
Added skips
Korijn 8f50d1a
Added test script for manual testing of the package
Korijn 859f744
terminal newline
Korijn 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
mkdir build | ||
cd build | ||
|
||
set BUILD_CONFIG=Release | ||
|
||
:: tell cmake where Python is | ||
set PYTHON_LIBRARY=%PREFIX%\libs\python%PY_VER:~0,1%%PY_VER:~2,1%.lib | ||
|
||
cmake .. -G "NMake Makefiles" ^ | ||
-Wno-dev ^ | ||
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ | ||
-DBUILD_TESTING:BOOL=OFF ^ | ||
-DBUILD_EXAMPLES:BOOL=OFF ^ | ||
-DBUILD_DOCUMENTATION:BOOL=OFF ^ | ||
-DPYTHON_INCLUDE_DIR:PATH="%PREFIX%/include" ^ | ||
-DPYTHON_LIBRARY:FILEPATH="%PYTHON_LIBRARY%" ^ | ||
-DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^ | ||
-DVTK_BUILD_PYTHON_MODULE_DIR:PATH="%SP_DIR%/vtk" ^ | ||
-DVTK_ENABLE_VTKPYTHON:BOOL=OFF ^ | ||
-DVTK_WRAP_PYTHON:BOOL=ON ^ | ||
-DVTK_PYTHON_VERSION:STRING="%PY_VER%" ^ | ||
-DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="%SP_DIR%" ^ | ||
-DModule_vtkWrappingPythonCore:BOOL=OFF ^ | ||
-DINSTALL_BIN_DIR:PATH="%LIBRARY_BIN%" ^ | ||
-DINSTALL_LIB_DIR:PATH="%LIBRARY_LIB%" ^ | ||
-DINSTALL_INC_DIR:PATH="%LIBRARY_INC%" ^ | ||
-DINSTALL_MAN_DIR:PATH="%LIBRARY_PREFIX%/man" | ||
if errorlevel 1 exit 1 | ||
|
||
nmake install | ||
if errorlevel 1 exit 1 |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
mkdir build | ||
cd build | ||
|
||
BUILD_CONFIG=Release | ||
|
||
# sometimes python is suffixed, this is a quick fix | ||
# in a future PR we should probably switch to cmake find python scripting | ||
PYTHON_INCLUDE=${PREFIX}/include/python${PY_VER} | ||
if [ ! -d $PYTHON_INCLUDE ]; then | ||
PYTHON_INCLUDE=${PREFIX}/include/python${PY_VER}m | ||
fi | ||
|
||
PYTHON_LIBRARY="libpython${PY_VER}.so" | ||
PYTHON_LIBRARY=${PREFIX}/lib/${PYTHON_LIBRARY} | ||
if [ ! -f $PYTHON_LIBRARY ]; then | ||
PYTHON_LIBRARY=${PREFIX}/lib/libpython${PY_VER}m.so | ||
fi | ||
|
||
cmake .. -G "Unix Makefiles" \ | ||
-Wno-dev \ | ||
-DCMAKE_BUILD_TYPE=$BUILD_CONFIG \ | ||
-DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \ | ||
-DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \ | ||
-DINSTALL_PKGCONFIG_DIR:PATH=$PKG_CONFIG_PATH \ | ||
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.
|
||
-DBUILD_DOCUMENTATION:BOOL=OFF \ | ||
-DBUILD_TESTING:BOOL=OFF \ | ||
-DBUILD_EXAMPLES:BOOL=OFF \ | ||
-DBUILD_SHARED_LIBS:BOOL=ON \ | ||
-DVTK_ENABLE_VTKPYTHON:BOOL=OFF \ | ||
-DVTK_WRAP_PYTHON:BOOL=ON \ | ||
-DVTK_PYTHON_VERSION:STRING="${PY_VER}" \ | ||
-DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="${SP_DIR}" \ | ||
-DModule_vtkWrappingPythonCore:BOOL=OFF \ | ||
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON \ | ||
-DPYTHON_INCLUDE_DIR:PATH=$PYTHON_INCLUDE \ | ||
-DPYTHON_LIBRARY:FILEPATH=$PYTHON_LIBRARY | ||
|
||
make install |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env python | ||
|
||
# This simple example shows how to do basic rendering and pipeline | ||
# creation. | ||
|
||
import vtk | ||
# The colors module defines various useful colors. | ||
from vtk.util.colors import tomato | ||
|
||
# This creates a polygonal cylinder model with eight circumferential | ||
# facets. | ||
cylinder = vtk.vtkCylinderSource() | ||
cylinder.SetResolution(8) | ||
|
||
# The mapper is responsible for pushing the geometry into the graphics | ||
# library. It may also do color mapping, if scalars or other | ||
# attributes are defined. | ||
cylinderMapper = vtk.vtkPolyDataMapper() | ||
cylinderMapper.SetInputConnection(cylinder.GetOutputPort()) | ||
|
||
# The actor is a grouping mechanism: besides the geometry (mapper), it | ||
# also has a property, transformation matrix, and/or texture map. | ||
# Here we set its color and rotate it -22.5 degrees. | ||
cylinderActor = vtk.vtkActor() | ||
cylinderActor.SetMapper(cylinderMapper) | ||
cylinderActor.GetProperty().SetColor(tomato) | ||
cylinderActor.RotateX(30.0) | ||
cylinderActor.RotateY(-45.0) | ||
|
||
# Create the graphics structure. The renderer renders into the render | ||
# window. The render window interactor captures mouse events and will | ||
# perform appropriate camera or actor manipulation depending on the | ||
# nature of the events. | ||
ren = vtk.vtkRenderer() | ||
renWin = vtk.vtkRenderWindow() | ||
renWin.AddRenderer(ren) | ||
iren = vtk.vtkRenderWindowInteractor() | ||
iren.SetRenderWindow(renWin) | ||
|
||
# Add the actors to the renderer, set the background and size | ||
ren.AddActor(cylinderActor) | ||
ren.SetBackground(0.1, 0.2, 0.4) | ||
renWin.SetSize(200, 200) | ||
|
||
# This allows the interactor to initalize itself. It has to be | ||
# called before an event loop. | ||
iren.Initialize() | ||
|
||
# We'll zoom in a little by accessing the camera and invoking a "Zoom" | ||
# method on it. | ||
ren.ResetCamera() | ||
ren.GetActiveCamera().Zoom(1.5) | ||
renWin.Render() | ||
|
||
# Start the event loop. | ||
iren.Start() |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% set version = "7.0.0" %} | ||
{% set minor_version = ".".join(version.split(".")[:2]) %} | ||
|
||
package: | ||
name: vtk | ||
version: {{ version }} | ||
|
||
source: | ||
url: http://www.vtk.org/files/release/{{ minor_version }}/VTK-{{ version }}.tar.gz | ||
fn: VTK-{{ version }}.tar.gz | ||
sha256: 78a990a15ead79cdc752e86b83cfab7dbf5b7ef51ba409db02570dbdd9ec32c3 | ||
|
||
build: | ||
number: 0 | ||
features: | ||
- vc9 # [win and py27] | ||
- vc10 # [win and py34] | ||
- vc14 # [win and py35] | ||
# only x64 py2.7 and x64 py3.5 on linux will complete before build timeout | ||
# see https://github.com/conda-forge/staged-recipes/pull/453#issuecomment-228308297 | ||
skip: true # [win or osx or linux32 or py34] | ||
|
||
requirements: | ||
build: | ||
- freeglut # [linux] | ||
- cmake | ||
- python | ||
run: | ||
- freeglut # [linux] | ||
- python | ||
|
||
test: | ||
imports: | ||
- vtk | ||
- vtk.vtkChartsCore | ||
- vtk.vtkCommonCore | ||
- vtk.vtkFiltersCore | ||
- vtk.vtkFiltersGeneric | ||
- vtk.vtkGeovisCore | ||
- vtk.vtkFiltersHybrid | ||
- vtk.vtkIOCore | ||
- vtk.vtkImagingCore | ||
- vtk.vtkInfovisCore | ||
- vtk.vtkRenderingCore | ||
- vtk.vtkViewsCore | ||
- vtk.vtkRenderingVolume | ||
- vtk.vtkInteractionWidgets | ||
|
||
about: | ||
home: http://www.vtk.org/ | ||
license: BSD 3-Clause | ||
summary: > | ||
The Visualization Toolkit (VTK) is an open-source, freely available software | ||
system for 3D computer graphics, modeling, image processing, volume | ||
rendering, scientific visualization, and information visualization. | ||
|
||
extra: | ||
recipe-maintainers: | ||
- Korijn | ||
- ivoflipse | ||
- Maxyme | ||
- ccordoba12 | ||
- grlee77 | ||
- msarahan | ||
- patricksnape |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
libXt-devel | ||
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. Need |
||
mesa-libGLU-devel |
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.
Don't we need
cmake
here? Otherwise how do we build for Mac?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.
We're trying to do so, but it's not entirely clear to us how that works on Linux.
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.
On second thought,
make install
should work just fine on both platforms I think...