Skip to content

Commit

Permalink
Latest recipe update
Browse files Browse the repository at this point in the history
  • Loading branch information
makepath-alex committed Dec 20, 2024
1 parent 675ec65 commit ef90756
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 12 deletions.
4 changes: 1 addition & 3 deletions conda-forge/recipe/build.bat → conda-forge/recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set ENABLE_TESTS=ON
set RTE_KERNELS=default
set FAILURE_THRESHOLD=7.e-4

FCFLAGS="-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -fbacktrace"
set FCFLAGS="-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -fbacktrace"

:: CMake configuration
mkdir build
Expand All @@ -36,7 +36,5 @@ cmake --build . -- /maxcpucount:%NUMBER_OF_PROCESSORS%
ctest --output-on-failure --test-dir . -V

:: Manually copy libraries, binaries, and Fortran module files to %PREFIX%
xcopy /s /y build\*.a %PREFIX%\lib\
xcopy /s /y build\*.dll %PREFIX%\lib\
xcopy /s /y build\*.lib %PREFIX%\lib\
xcopy /s /y build\*.mod %PREFIX%\include\
1 change: 0 additions & 1 deletion conda-forge/recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ mkdir -p $PREFIX/include

# Copy libraries
find $SRC_DIR/build/ -name "*.a" -exec cp {} $PREFIX/lib/ \;
find $SRC_DIR/build/ -name "*.so*" -exec cp {} $PREFIX/lib/ \;

# Copy Fortran module files
find $SRC_DIR/build/modules -name "*.mod" -exec cp {} $PREFIX/include/ \;
51 changes: 43 additions & 8 deletions conda-forge/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% set name = "rte_rrtmgp" %}
{% set version = "cmake.dev" %}


package:
name: {{ name|lower }}
version: {{ version }}
Expand All @@ -10,35 +11,68 @@ source:
url: https://github.com/earth-system-radiation/rte-rrtmgp/archive/refs/heads/makepath-cmake.zip
sha256: c79a6d076c8061d36dc63770a540d05423633c975b07a3ad95fc824099e6992f

build:
number: 0

requirements:
build:
# General
- cmake # CMake to configure the project
- ninja # Ninja to run the build
- python >=3.10 # Required for testing Python
- python # Required for testing Python
- conda-forge::netcdf-fortran >=4.5,<5.0 # Required for testing Fortran NetCDF library
- netcdf4 # Required for testing
- xarray # Required for testing
- dask # Required for testing
- numpy # Required for testing
- matplotlib # Required for testing
- colorcet # Required for testing
# Unix
- {{ compiler('fortran') }} # [unix]
# Uinx
- {{ stdlib("c") }} # [unix]
- {{ compiler('fortran') }} # [unix]
# Win
- {{ compiler('m2w64_fortran') }} # [win]
- {{ stdlib('m2w64_c') }} # [win]
- {{ compiler('m2w64_fortran') }} # [win]
host:
# General
- cmake # CMake to configure the project
- python >=3.10 # Python required for running tests
- python # Python required for running tests
- conda-forge::netcdf-fortran >=4.5,<5.0 # Required runtime for testing
# Unix
- {{ compiler('fortran') }} # [unix]
- {{ compiler('fortran') }} # [unix]
# Win
- {{ compiler('m2w64_fortran') }} # [win]
- {{ compiler('m2w64_fortran') }} # [win]
run:
# General
- python >=3.10
- python

test:
commands:
# Check if the files exists
# Unix
- test -f $PREFIX/lib/librrtmgp.a # [unix]
- test -f $PREFIX/lib/librrtmgpkernels.a # [unix]
- test -f $PREFIX/lib/librte.a # [unix]
- test -f $PREFIX/lib/librtekernels.a # [unix]
# Win
- test -f $PREFIX/lib/librrtmgp.lib # [win]
- test -f $PREFIX/lib/librrtmgpkernels.lib # [win]
- test -f $PREFIX/lib/librte.lib # [win]
- test -f $PREFIX/lib/librtekernels.lib # [win]

outputs:
- name: rte_rrtmgp
files:
# Unix
- lib/librrtmgp.a # [unix]
- lib/librrtmgpkernels.a # [unix]
- lib/librte.a # [unix]
- lib/librtekernels.a # [unix]
# Win
- lib/librrtmgp.lib # [win]
- lib/librrtmgpkernels.lib # [win]
- lib/librte.lib # [win]
- lib/librtekernels.lib # [win]

about:
home: https://github.com/earth-system-radiation/rte-rrtmgp
Expand All @@ -51,3 +85,4 @@ about:
extra:
recipe-maintainers:
- RobertPincus
- makepath-alex

0 comments on commit ef90756

Please sign in to comment.