LLNL / conduit

Simplified Data Exchange for HPC Simulations
https://software.llnl.gov/conduit/
Other
214 stars 65 forks source link

PyPI Support for the Python Wrappers #979

Open FreddieWitherden opened 2 years ago

FreddieWitherden commented 2 years ago

It would be nice if conduit was available as a package on PyPI. In order to keep things sane the package would probably have to come in source form depend on a pre-existing conduit install (a bit like how mpi4py depends on MPI having already been installed or pyopencl depends on an available OpenCL install). This would be very useful for those who work in virtual environments.

One slight snag is that there is already an unrelated package called conduit, so either a prefix or suffix will be needed.

cyrush commented 2 years ago

I agree this would be nice to provide.

Now that we have better setup.py support --- this might be easier to do this than in the past.

We would need to learn the right strategy to create the package - if you have any specific examples we could follow that would be great. I believe there are nice templates for using docker + manylinx to build wheels suitable or pypi, but I don't recall them right now. Perhaps we can look at h5py or mpi4py's approach.

Just in case you aren't aware:

We do provide conda forge builds: https://anaconda.org/conda-forge/conduit

And we also provide spack support: https://github.com/spack/spack

Most of our development leverages spack.

But pypi would open up conduit to a lot more users!

cyrush commented 2 years ago

ci wheel build setup: https://github.com/pypa/cibuildwheel

cyrush commented 2 years ago

Example cibuildwheel github actions setup for numpy: https://github.com/numpy/numpy/blob/main/.github/workflows/wheels.yml

FreddieWitherden commented 2 years ago

Some care is likely needed around binary distribution. For example, what happens if one wants to install ascent? If their conduit has come from PyPI then import conduit will load a version of conduit which is different to that which is installed on the system and hence import ascent, which implicitly depends on conduit, will bring in a second, possibly different, version.