Skip to content

Automatically install the OOP C++ header#379

Open
Radonirinaunimi wants to merge 3 commits intomasterfrom
install-cpp-header
Open

Automatically install the OOP C++ header#379
Radonirinaunimi wants to merge 3 commits intomasterfrom
install-cpp-header

Conversation

@Radonirinaunimi
Copy link
Member

@Radonirinaunimi Radonirinaunimi commented Mar 5, 2026

So far, the OOP C++ header had to be copied manually into where the C header is located or within the project. This allows one to specify a PINEAPPL_C_INSTALL_PREFIX environment variable so that the header is automatically copied at build time. The release workflow has also been adjusted so that this is automatically installed when copying the pre-built binaries:

curl --proto ... | sh -s -- --prefix /my/custom/installation/path

TO DO:

  • Update the documentation

@Radonirinaunimi Radonirinaunimi linked an issue Mar 5, 2026 that may be closed by this pull request
9 tasks
@felixhekhorn
Copy link
Contributor

Looks good to me.

  • out of laziness I haven't explicitly run the code to check if it actually works - should I do so?
  • I would be happy if the OOP interface gets integrated more into the program, but if I remember correctly from Stabilize APIs #328 @cschwan is sceptical about that ... in particular, it was a conscious decision to leave the OOP interface aside; also due to compatibility reasons

@Radonirinaunimi
Copy link
Member Author

* out of laziness I haven't explicitly run the code to check if it actually works - should I do so?

No, not needed. Everything is being checked in the CI. So it was more whether or not you agree with the concept.

* I would be happy if the OOP interface gets integrated more into the program, but if I remember correctly from [Stabilize APIs #328](https://github.com/NNPDF/pineappl/pull/328) @cschwan is sceptical about that ... in particular, it was a conscious decision to leave the OOP interface aside; also due to compatibility reasons

I believe (if I recall correctly) that this discussion was RE the Fortran side.

@cschwan
Copy link
Contributor

cschwan commented Mar 7, 2026

Note that the C++ header was installed in the past, but I decided to no longer do that in commit addf958. See the commit for a better way to install it.

However, every interface that we decide to support adds a lot of maintenance burden to us and SemVer restricts us in ways in which we can change it. As far as I can remember we bent the rules quite a bit with C++ and thus I would refrain from calling it an official API, which are C, Python and Rust.

C++ and Fortran are wrappers, both of which use the C interface. We can change the wrappers anytime we want and in any way we see fit, because we assume the people using the wrappers copy them to their source tree. I think this is a good practice and I would keep it that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestions for small improvements

3 participants