earth-system-radiation / rte-rrtmgp

RTE+RRTMGP is a set of codes for computing radiative fluxes in planetary atmospheres.
BSD 3-Clause "New" or "Revised" License
75 stars 66 forks source link

Distribute libraries (conda, maybe apt?) #274

Open RobertPincus opened 5 months ago

RobertPincus commented 5 months ago

We would like to distribute the RTE and RRTMGP libraries via conda and possibly other channels (e.g. apt-get). Libraries would be updated at each release.

For conda we will need to write a recipe and get it adopted as a feedstock. I think conda uses CMake, which we don't currently support.

We can build separate libraries for the kernels and the Fortran frontend, or libraries that combine both. The Python frontend needs just the kernels - is that what we'd start with?

gnikit commented 4 months ago

I believe we can deploy the feedstock to Linux/OSX/Windows without switching the build system to CMake. That being said, if the intention is to natively build for non-Unix platforms e.g. Windows then it would be safer to use a cross-platform build system that's not available only on Unix-style platforms.

Since the library is quite small and with no external dependencies, swapping the build system is not that difficult.

As for what should be inside the conda-forge feedstock, my suggestion would be to have the full set of libs and probably the Python bindings too. We can make incremental progress on this, by first adding the libs and then adding the rest of the components to the feedstock.

RobertPincus commented 4 months ago

@gnikit thanks for this help too. The Fortran libraries and Python codes will likely be distributed via conda and other channels separately, since chances can and will happen to the two repos independently.

The Windows makefiles produce static libraries with .a suffixes? .

gnikit commented 4 months ago

@gnikit thanks for this help too. The Fortran libraries and Python codes will likely be distributed via conda and other channels separately, since chances can and will happen to the two repos independently.

That's good news! It simplifies the conda recipe a lot.

The Windows makefiles produce static libraries with .a suffixes? .

Yes, but I suspect to be a true Windows library it should be a .lib or a .dll.