flux-core
flux-core copied to clipboard
Add Python bindings to PyPI for easy user-installation via pip
Since our bindings are currently tightly coupled to the flux version that they are configured/compiled against, I'm not sure what the best/most portable way to accomplish this is. Requires some more thought, but wanted to bookmark the idea for now.
Just wanted to send a ping on this to see what's going on with it; would be really great to be able to decouple this and enable using different python (virtualenvs) than what the scheduler is compiled against, particularly as it becomes the default scheduler for the system rather than something users boot strap themselves.
Hmm - either there could be some kind of compatibility test, or possibly we could just release the versions in sync with the flux release that matches it? And then provide an easy way to derive that command for the user from their flux install?
Yeah, maybe the env vars could just be queried to check the flux version and choose the appropriate wrappers at import time? Don't think having to update the pypi package along with flux is much of a burden, though if that same newest package could still support at least a few older flux versions that'd probably be useful? Could be a nightmare for users if they have to poke through the package history to find the one that works for a specific flux install (though maybe there's some python packaging magic that can make that easier for pip to just figure out or something?).
I think the simplest thing is to have a pypi release with every flux release and just match the version. We would need to make sure when someone pip installs, they choose the right one (as default goes to latest and they might not be using latest flux).
I think the simplest thing is to have a pypi release with every flux release and just match the version. We would need to make sure when someone pip installs, they choose the right one
:+1: FWIW, that is exactly what pyslurm does as well: https://github.com/PySlurm/pyslurm#release-versioning
This is definitely done - https://pypi.org/project/flux-python/
For future readers of this issue if you need a newer version, I build them request (and then can get better feedback for testing, etc). Please open issues for questions / discussion here: https://github.com/flux-framework/flux-python