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

Package stormpy as a wheel #161

Open
linusheck opened this issue Apr 23, 2024 · 6 comments
Open

Package stormpy as a wheel #161

linusheck opened this issue Apr 23, 2024 · 6 comments

Comments

@linusheck
Copy link

linusheck commented Apr 23, 2024

Hi,
it is easy to compile stormpy as a python wheel:

python3 -m build --wheel
=> Successfully built stormpy-1.8.0-cp312-cp312-macosx_14_0_arm64.whl

pip install ./dist/stormpy-1.8.0-cp312-cp312-macosx_14_0_arm64.whl

Why not package it as a wheel? The stormpy installation would go from compiling storm on the right version, compiling stormpy, etc., to just doing a pip install stormpy. There would need to be someone on a Linux and someone on a MacOS system compiling it every release, but I don't see this as a big issue.
You could also package it as a wheel under a different name or under a toggle, like pip install stormpy[prebuilt].

@volkm
Copy link
Contributor

volkm commented Apr 23, 2024

That reminds me that I should keep an eye on the stormpy package at pypi. At the moment, the package needs to be compiled though and we do not distribute a pre-compiled python wheel.
A potential problem might be that users have different configurations of Storm installed and I am not sure how well a pre-compiled package would work here. Do you have experience with it?

I would also first start with providing binaries for Storm (see moves-rwth/storm#527) before looking at stormpy.

@linusheck
Copy link
Author

linusheck commented Apr 23, 2024

A potential problem might be that users have different configurations of Storm installed and I am not sure how well a pre-compiled package would work here. Do you have experience with it?

As far as I understand, a python wheel is supposed to be a self-contained binary, but there might be issues with linking dependencies, I'll have to look closer. One probably has to do some configuration before it works well.

I would also first start with providing binaries for Storm (see moves-rwth/storm#527) before looking at stormpy.

Maybe, I don't know. I can still install storm through homebrew or the AUR more or less easily, but this isn't the case for stormpy. I also kind of subjectively expect a python tool to be easily installable with pip, but I don't have the same expectations of a C++ tool. But of course, doing both would be great for prospective users :)

@volkm
Copy link
Contributor

volkm commented Apr 23, 2024

Regarding easy to install via pip: it should work in principle with pip install stormpy using the existing pypi package. It will need to compile stormpy but it should not require any more steps from your side.
I have not tested it recently, so let me know in case of problems.

@linusheck
Copy link
Author

Regarding easy to install via pip: it should work in principle with pip install stormpy using the existing pypi package. It will need to compile stormpy but it should not require any more steps from your side. I have not tested it recently, so let me know in case of problems.

That package looks for my local storm install and compiles using that, so I guess you need storm installed? I was suggesting to put storm into the prebuilt wheel (I'm not sure if this is what I'm doing with the above commands though).

@volkm
Copy link
Contributor

volkm commented Apr 23, 2024

Ok, now I understand your idea. As far as I am aware the wheel package will only contain the stormpy libraries but not Storm itself.
Personally, I would try to keep Storm and stormpy in separate libraries as stormpy is supposed to be an addon to Storm. Moreover, Storm itself depends on other packages which must be installed via a package manager and not via Python.
But I can understand that we want to have an easier installation process, especially if most people want to access Storm through Python. If we would have a pre-built Storm binary, we could maybe ship it in a pre-built stormpy package. One other way currently supported is to go via Python notebooks in a Docker container.

@linusheck
Copy link
Author

linusheck commented Apr 23, 2024

As far as I am aware the wheel package will only contain the stormpy libraries but not Storm itself.

That makes sense. We can probably get storm in there though :)

Storm itself depends on other packages which must be installed via a package manager and not via Python

This is true for many Python packages, but as long as it's only via the package manager, it's still quite a bit easier than compiling Storm.

stormpy is supposed to be an addon to Storm

Yes, but it's also the easiest way to use Storm as a backend and glue it together with other projects :)

One other way currently supported is to go via Python notebooks in a Docker container.

Yes, but that is more difficult to set up locally. It's a different thing, more a playground for stormpy than something you would use in a small project where you also have other dependencies.

If we would have a pre-built Storm binary, we could maybe ship it in a pre-built stormpy package.

Exactly, I think that would be great for users.

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

No branches or pull requests

2 participants