Skip to content

Commit

Permalink
added conda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
jornbr committed Oct 27, 2023
1 parent 90175f2 commit ec05988
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conda.recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mkdir build
cd build
cmake -DPython3_EXECUTABLE="%PYTHON%" -DCMAKE_BUILD_TYPE=Release %SRC_DIR%\python || exit /b
cmake --build . --config Release --parallel %CPU_COUNT% || exit /b
cmake --install . || exit /b
cd ..
rmdir /S /Q build

7 changes: 7 additions & 0 deletions conda.recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mkdir build
cd build
cmake -DPython3_EXECUTABLE="$PYTHON" -DCMAKE_BUILD_TYPE=Release $SRC_DIR/python
cmake --build . --config Release --parallel $CPU_COUNT
cmake --install .
cd ..
rm -r build
8 changes: 8 additions & 0 deletions conda.recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#fortran_compiler_version: # [unix]
# - 9 # [linux]

python:
- 3.8
- 3.9
- 3.10
- 3.11
40 changes: 40 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% set version = "0.1.2" %}
package:
name: fabmos
version: {{ version }}

source:
- url: https://github.com/BoldingBruggeman/fabmos/releases/download/v{{ version }}/fabmos.tar.gz

build:
script:
{{ PYTHON }} -m pip install . -vv

requirements:
host:
- python
- pip
- setuptools_scm
build:
- cmake
- make # [not win]
- {{ compiler('c') }} # [win] needed to find MSVC
- {{ compiler('fortran') }} # [not win]
run:
- python
- xarray
- mpi4py
- netCDF4
- pygetm

test:
imports:
- fabmos

about:
home: https://github.com/BoldingBruggeman/fabmos
summary: FABM offline simulator
description: |
Offline simulator for the Framework for Aquatic Biogeochemical Models
license: GPL
dev_url: https://github.com/BoldingBruggeman/fabmos
10 changes: 10 additions & 0 deletions conda.recipe/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Linux

`conda-build <RECIPEDIR> -c conda-forge -c bolding-bruggeman`

# Windows

`conda-build <RECIPEDIR> -c conda-forge -c bolding-bruggeman`

If VS2017 or VS2019 + MSVC v141 is installed, this command should work on a
normal command prompt. (no need to load MSVC or Intel-specific environments)

0 comments on commit ec05988

Please sign in to comment.