Code Monkey home page Code Monkey logo

Comments (8)

awvwgk avatar awvwgk commented on May 9, 2024 3

Fpm is now available in spack develop branch: spack/spack#25799

from fpm.

awvwgk avatar awvwgk commented on May 9, 2024 2

I think rather than writing a spack package from fpm as first step, we should enable fpm to work as build system for spack by

  • providing a way to satisfy fpm dependencies by spack (maybe #439)
  • create libraries usable by other spack packages (maybe #681)

from fpm.

awvwgk avatar awvwgk commented on May 9, 2024 1

Will take a stab at writing a spack package for fpm. Once we have this it should be easy to package any fpm project in spack without extra effort in fpm.

from fpm.

awvwgk avatar awvwgk commented on May 9, 2024

I haven't used spack yet, but was always tempted to try it (the somewhat second-class support for my favorite build system, meson, hold me back so far). From what I got so far about spack it seems similar to homebrew, in the way that package files are not written in a configuration language or DSL, but in Python (like formulas in homebrew are written in Ruby) and the main packages are stored inside the package manager's monolithic repository.

How can we actually create a package for spack with fpm? First, this would require to have fpm as spack package first, wouldn't it? It might be easier to follow #69 and just use spack's support for CMake to build any fpm project instead.

from fpm.

certik avatar certik commented on May 9, 2024

@awvwgk there are multiple ways this can be achieved, I don't know yet the best way forward. I think our requirements are:

  • Work with upstream fpm packages (say stdlib, f-toml, etc.) with their upstream sources (whether git or tarball) without the need to host a separate spack specific tarball
  • We submit the package to Spack, so there will be a Python formula for it, just like other Spack packages

It looks like we have at least two paths forward:

Option 1

The Spack formula calls fpm to build the package ---- Spack itself handles downloading of the tarball (or git) and unpacking it, as well as building all dependencies. But fpm could be used from the Spack formula, we would have to probably implement some command line options to tell it where spack put all the dependencies (presumably also built with fpm underneath), then fpm would build the current package and hand it over to Spack.

Option 2

The Spack formula would call fpm to generate a CMake based build system, and then it would just call cmake. The issues how to find dependencies would be similar (if not identical) to Option 1.


As such, we just have to get started and get it figured out one way or another, and if some extra arguments for fpm have to be implemented, then we can do it.

from fpm.

certik avatar certik commented on May 9, 2024

Note that to fix this issue, I am imagining something like fpm --create-spack-package and it will take the current fpm package in the current directory, and spit out the spack Python file that can be used with Spack to build it.

from fpm.

certik avatar certik commented on May 9, 2024

@awvwgk I agree, that is higher priority.

from fpm.

wyphan avatar wyphan commented on May 9, 2024

Like I mentioned on Fortran Discourse forum, I recently patched the fpm package in Spack with spack/spack#30158 and spack/spack#30342 . Would love to see Option 1 happen!

from fpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.