espressomd / espresso

The ESPResSo package
https://espressomd.org
GNU General Public License v3.0
228 stars 183 forks source link

Make espresso "pip installable" by adding a setup.py file #4222

Open KaiSzuttor opened 3 years ago

KaiSzuttor commented 3 years ago

... just like any other python package

KaiSzuttor commented 3 years ago

An example can be found in https://github.com/m-pilia/disptools

RudolfWeeber commented 3 years ago

This would be desirable.

I guess the issue is that not all dependencies can be pip-installed.

In the example you posted it was not obvious to me, how C++ library dependencies are handled. And then, there is MPI, which also lives outside the Python realm.

jngrad commented 3 years ago

See https://pypi.org/project/lbmpy/ for a python package that takes arguments in brackets to include features like GPU support. The corresponding python logic to handle these arguments is available in pycodegen/lbmpy:setup.py#L99-107.

KaiSzuttor commented 3 years ago

This would be desirable.

I guess the issue is that not all dependencies can be pip-installed.

In the example you posted it was not obvious to me, how C++ library dependencies are handled. And then, there is MPI, which also lives outside the Python realm.

I think it's okay to fail if you provide a source package. We could probably also deploy a wheel binary package (c.f. https://softwareengineering.stackexchange.com/questions/408214/best-way-to-go-about-including-c-c-dependencies-in-python-packages). BTW this is pretty standard, maplotlib for example may also fail to install via pip because of unmet dependencies.

SamTov commented 3 years ago

TensorFlow is a good example of a project heavily built on cpp libraries but has a nice pip install interface.

To a lesser extent for just linking c++ files is DScribe which uses the same approach as MDAnalysis

They might be helpful references.

SamTov commented 2 years ago

I can try to do it. No promises on time though.