Skip to content

Commit

Permalink
example-cxx works on Mac!
Browse files Browse the repository at this point in the history
Using the global environment file, I was able to run most of the example and successfully test the BMI down to the end of https://babelizer.readthedocs.io/en/mdpiper-add-cxx-example/example-cxx.html#test-the-bmi.
csdms/babelizer#105
  • Loading branch information
aufdenkampe committed Apr 23, 2024
1 parent 8501507 commit 533a81a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
11 changes: 8 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
name: wrap-all
channels:
- conda-forge
- nodefaults # Speeds solving env, by limiting the number of options
dependencies:
# From examples in https://babelizer.readthedocs.io/en/mdpiper-add-cxx-example/
- python>=3.10
- make
- cmake
Expand All @@ -11,11 +13,13 @@ dependencies:
- bmi-c
- cxx-compiler
- bmi-cxx
# - fortran-compiler
# - bmi-fortran
- fortran-compiler
- bmi-fortran
# - babelizer # installs latest release. pip install below for dev
- bmi-tester
- pymt>=1.3
# - pymt>=1.3 # Not installing for now, until it gets updated

# other dependancies to improve build workflow
- gimli.units=0.3.1 # Before reorg (https://github.com/mcflugen/gimli/pull/18)
# to prevent import error with pymt=1.3.1

Expand All @@ -26,4 +30,5 @@ dependencies:
- pip
- pip:
# - -e git+https://github.com/csdms/babelizer.git@develop # installs head of branch
# install head of `mdpiper/add-cxx-example` branch:
- git+https://github.com/csdms/babelizer.git#111ed1b0f62e0a20ba373a465914ccbb5b17adb6
41 changes: 41 additions & 0 deletions example-cxx/babel_heatcxx.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://babelizer.readthedocs.io/ for more information

# Describe the library being wrapped.
[library.HeatCxx]
language = "c++"
library = "bmiheatcxx"
header = "bmi_heat.hxx"
entry_point = "BmiHeat"

# Describe compiler options need to build the library being wrapped.
[build]
undef_macros = []
define_macros = []
libraries = []
library_dirs = []
include_dirs = []
extra_compile_args = []

# Describe the newly wrapped package.
[package]
name = "pymt_heatcxx"
requirements = []

[info]
github_username = "pymt-lab"
package_author = "csdms"
package_author_email = "[email protected]"
package_license = "MIT License"
summary = "PyMT component for the C++ heat model"

[ci]
python_version = [
"3.10",
"3.11",
"3.12",
]
os = [
"linux",
"mac",
"windows",
]
1 change: 1 addition & 0 deletions example-cxx/test/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.5, 8.0, 6, 5

0 comments on commit 533a81a

Please sign in to comment.