Skip to content

Commit

Permalink
#20 Add conda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Nov 4, 2024
1 parent c7172ff commit e6e82c8
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
16 changes: 12 additions & 4 deletions examples/cells/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)

# Find VTK
find_package(VTK COMPONENTS CommonCore QUIET)
if(VTK_FOUND)
find_package(VTK REQUIRED COMPONENTS CommonCore RenderingCore RenderingOpenGL2 WrappingPythonCore)
else()
foreach(_core_module vtkCommonCore CommonCore)
find_package(VTK COMPONENTS ${_core_module} QUIET)
if(VTK_FOUND)
break()
endif()
endforeach()

if(VTK_VERSION VERSION_LESS 9.0.0)
find_package(VTK REQUIRED COMPONENTS vtkCommonCore vtkRenderingCore vtkRenderingOpenGL2 vtkWrappingPythonCore)
else()
find_package(VTK REQUIRED COMPONENTS CommonCore RenderingCore RenderingOpenGL2 WrappingPythonCore)
endif()

message(STATUS "VTK version: ${VTK_VERSION}")

# Find PETSc
find_package(PETSc REQUIRED)

Expand Down
3 changes: 3 additions & 0 deletions examples/cells/conda-recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -ex

$PYTHON -m pip install .
36 changes: 36 additions & 0 deletions examples/cells/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% set version = "0.0.1" %}
{% set build = 0 %}

package:
name: pycells
version: {{ version }}

source:
path: ..

build:
number: {{ build }}

requirements:
build:
- cmake
- ninja
- pip
- python
- scikit-build
- setuptools

host:
- mpi4py
- mpich
- petsc
- petsc4py
- python
- vtk

test:
imports:
- pycells

about:
license: BSD-3-Clause

0 comments on commit e6e82c8

Please sign in to comment.