Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose build information to Python #136

Closed
felixhekhorn opened this issue Apr 4, 2022 · 7 comments
Closed

Expose build information to Python #136

felixhekhorn opened this issue Apr 4, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@felixhekhorn
Copy link
Contributor

How about adding something like PyO3/maturin#100 ? or as is written there https://github.com/PyO3/pyo3-built/

this would facilitate the debugging process ...

@felixhekhorn felixhekhorn added the enhancement New feature or request label Apr 4, 2022
@alecandido
Copy link
Member

pyo3-built looks unnecessarily complex and too unmaintained.

I'd suggest to go for the first option, it looks perfect to me :)

@cschwan
Copy link
Contributor

cschwan commented Apr 4, 2022

That's a good idea, I'll look into it!

@cschwan cschwan self-assigned this Apr 4, 2022
@cschwan cschwan added this to the v0.5.3 milestone Apr 4, 2022
@cschwan
Copy link
Contributor

cschwan commented May 16, 2022

I tried adding

m.add("__version__", env!("CARGO_PKG_VERSION"))?;

in src/lib.rs, but this doesn't have an effect. It should add a variable pineappl.__version__, shouldn't it?

@felixhekhorn
Copy link
Contributor Author

yes - you can check the available attributes with dir (in case it got bound somewhere else ...)

felixhekhorn added a commit that referenced this issue Jun 1, 2022
@felixhekhorn
Copy link
Contributor Author

@cschwan the magic was just in the nesting of the layers (it got bound in pineappl.pineappl) - I reexposed it again on top level

@felixhekhorn
Copy link
Contributor Author

@scarlehoff this is what would have helped us in hunting NNPDF/nnpdf#1529 (comment)

@cschwan
Copy link
Contributor

cschwan commented Jun 1, 2022

@felixhekhorn cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants