Skip to content

Using sci kit build#17

Open
shimwell wants to merge 5 commits intosrc_and_src_cpp_foldersfrom
using-sci-kit-build
Open

Using sci kit build#17
shimwell wants to merge 5 commits intosrc_and_src_cpp_foldersfrom
using-sci-kit-build

Conversation

@shimwell
Copy link
Owner

this just allows the package to be installed with scikit build

@shimwell shimwell changed the base branch from develop to src_and_src_cpp_folders November 3, 2022 09:07
@shimwell
Copy link
Owner Author

shimwell commented Nov 3, 2022

@shimwell
Copy link
Owner Author

shimwell commented Nov 8, 2022

I've been running the ci manually and it is passing CI
https://github.com/shimwell/openmc/actions/runs/3385193646

@hassec
Copy link

hassec commented Dec 13, 2022

Hi @shimwell, I've found this via openmc-dev#1242.

Just a curious bystander wondering how far you have already gotten trying to make OpenMC a PyPI package?
I've not worked with sckit-build before, but have a lot of C++ experience, and I'd be happy to be a guinea pig or help in any way I can :).

@shimwell
Copy link
Owner Author

Thanks for your interest, your could give this a go and let me know if it works

pip install git+https://github.com/shimwell/openmc.git@using-sci-kit-build

@hassec
Copy link

hassec commented Dec 14, 2022

Thanks for the prompt reply @shimwell.

I just tried the pip install, and everything works as expected 👍 (python 3.10.7, pip 22.3.1)

@shimwell
Copy link
Owner Author

Awesome thanks for testing @hassec

I was half expecting something to fail as there are kind of two parts the package which can be tested with simple terminal commands simple python -c 'import openmc' checks the python side is installed. It should just not print any errors. The executable that can be tested with a simple openmc and it should print out the openmc logo like normal.

glad to hear things are working.

I discussed making a PR and merging with @paulromano and we are mainly waiting for the right time to cause minimal disruptions.

@hassec
Copy link

hassec commented Dec 14, 2022

@shimwell I tested the import of the python package and played around a bit and couldn't see a problem. But I realized that I was a bit to quick, because the package didn't come with the openmc binary so my openmc run actually used my normal install.

So I now went with trying to do a run based on existing xml files via

import openmc 
openmc.run(...)

and that resulted in a openmc: error while loading shared libraries: libopenmc.so: cannot open shared object file: No such file or directory

Easily fixed via export LD_LIBRARY_PATH=/home/chasse/software/pyenv/versions/test_openmc_pip/lib/python3.10/site-packages/openmc/lib/

after which the above worked, and the tallies.out looks identical to the one I produced from the same settings with my default openmc install

@shimwell
Copy link
Owner Author

Thanks this is super useful to know. I hope this need for a manual LD_LIBRARY_PATH gets fixed in the ciwheelbuilder PR which is over here

@hassec
Copy link

hassec commented Dec 15, 2022

Oh nice, I'll keep an eye on that PR as well, and am happy to try a built wheel once they work 😊

@shimwell
Copy link
Owner Author

scikit-build was just updated to version 0.16.5

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.

2 participants