Skip to content

Commit

Permalink
Create conda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Besler committed Nov 7, 2019
1 parent 1e90864 commit 12dd332
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
25 changes: 25 additions & 0 deletions conda-recipe/vtkbone/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

:: Create build directory
mkdir build
cd build
set BUILD_CONFIG=Release

:: CMake
cmake .. ^
-G "Ninja" ^
-DCMAKE_BUILD_TYPE=%BUILD_CONFIG% ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DBOOST_ROOT:PATH="%PREFIX%" ^
-DENABLE_TESTING:BOOL=ON ^
-DBUILD_SHARED_LIBS:BOOL=OFF ^
-DCMAKE_C_COMPILER="cl.exe" ^
-DCMAKE_CXX_COMPILER="cl.exe"
if errorlevel 1 exit 1

:: Compile and install
ninja install
if errorlevel 1 exit 1

:: Run tests
ctest -V
if errorlevel 1 exit 1
36 changes: 36 additions & 0 deletions conda-recipe/vtkbone/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# Create build directory
mkdir build
cd build
BUILD_CONFIG=Release

# Specify Python
case $(uname | tr '[:upper:]' '[:lower:]') in
linux*)
export PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}.so"
export PYTHON_INCLUDE_DIR="${PREFIX}/include/python${PY_VER}"
;;
darwin*)
export PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}.dylib"
export PYTHON_INCLUDE_DIR="${PREFIX}/include/python${PY_VER}"
;;
*)
esac

# CMake
cmake .. \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=$BUILD_CONFIG \
-DCMAKE_PREFIX_PATH:PATH="${PREFIX}" \
-DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \
-DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \
-DBOOST_ROOT:PATH="${PREFIX}" \
-DPYTHON_LIBRARY:FILEPATH="${PYTHON_LIBRARY}" \
-DPYTHON_INCLUDE_DIR:PATH="${PYTHON_INCLUDE_DIR}" \
-DENABLE_TESTING:BOOL=ON

# Compile and install
ninja install -v

# Run tests
ctest -V
38 changes: 38 additions & 0 deletions conda-recipe/vtkbone/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

package:
name: vtkbone
version: {{ GIT_DESCRIBE_TAG | lower | replace("v","") }}

source:
path: ./../../

build:
number: 0

requirements:
build:
- {{ compiler('c') }}
- cmake >=3.1.0
- ninja
- gtest
- boost >=1.59
- libnetcdf
- pqctio
- aimio
- vtk =6.3
run:
- boost >=1.59
- libnetcdf
- pqctio
- aimio
- vtk =6.3

about:
home: https://github.com/Numerics88/vtkbone
license: MIT
license_family: MIT
license_file: LICENSE
summary: 'VTK classes for bone FEA'
description: |
VTK classes for processing of finite element models derived from micro-CT. vtkbone was formerly vtkn88.
dev_url: https://github.com/Numerics88/vtkbone

0 comments on commit 12dd332

Please sign in to comment.