fpm icon indicating copy to clipboard operation
fpm copied to clipboard

Have a Conda backend

Open certik opened this issue 5 years ago • 6 comments

This is related to #69 but it's a separate issue. fpm should be able to create a Conda package for the project, so that it's easy to submit it to conda-forge.

certik avatar Apr 30 '20 20:04 certik

What's required for a Conda package?

everythingfunctional avatar Apr 30 '20 21:04 everythingfunctional

Here is a Conda package for my dftatom Fortran package:

https://github.com/conda-forge/dftatom-feedstock/

The main config file:

https://github.com/conda-forge/dftatom-feedstock/blob/5f4e97e3c089337b5a8e4c9be6c2c7f36dca8c6c/recipe/meta.yaml

Linux / macOS build script:

https://github.com/conda-forge/dftatom-feedstock/blob/5f4e97e3c089337b5a8e4c9be6c2c7f36dca8c6c/recipe/build.sh

And Windows build script:

https://github.com/conda-forge/dftatom-feedstock/blob/5f4e97e3c089337b5a8e4c9be6c2c7f36dca8c6c/recipe/bld.bat

All of which could be generated. The build process could simply just call fpm on all platforms.

certik avatar Apr 30 '20 21:04 certik

That seems like it wouldn't actually require any changes to FPM.

everythingfunctional avatar Apr 30 '20 22:04 everythingfunctional

One still has to generate things like "description", "name" (both of which fpm knows), and the proper template to call fpm. But yes, it should be a simple backend to fpm.

certik avatar Apr 30 '20 23:04 certik

Now that we have a fpm version at conda-forge, packaging fpm projects is quite straight-forward except for some minor issues. Is there anything further required on the fpm side?

awvwgk avatar Sep 05 '21 22:09 awvwgk

Do we have some example of a Conda package that uses fpm?

I think there is a number of issues:

  • Dependencies must be packaged as Conda
  • Alternatively, they should be pre-downloaded.
  • They should not be downloading during the build (as the currently do)

The same issue will happen when packaging for Debian and other distros. They like to have a clean upstream tarball, and then no downloads happening during the build. So we need to improve fpm to be able to provide that, one way or another.

certik avatar Sep 06 '21 00:09 certik