espresso icon indicating copy to clipboard operation
espresso copied to clipboard

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

Open KaiSzuttor opened this issue 3 years ago • 6 comments

... just like any other python package

KaiSzuttor avatar Apr 12 '21 07:04 KaiSzuttor

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

KaiSzuttor avatar Apr 12 '21 07:04 KaiSzuttor

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.

RudolfWeeber avatar Apr 12 '21 09:04 RudolfWeeber

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.

jngrad avatar Apr 12 '21 09:04 jngrad

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.

KaiSzuttor avatar Apr 18 '21 09:04 KaiSzuttor

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 avatar Jul 01 '21 14:07 SamTov

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

SamTov avatar Oct 28 '21 11:10 SamTov