espressopp icon indicating copy to clipboard operation
espressopp copied to clipboard

Espressopp as a Python package accessible via PyPI

Open jkrajniak opened this issue 8 years ago • 6 comments

jkrajniak avatar Feb 29 '16 11:02 jkrajniak

+1

govarguz avatar Feb 29 '16 12:02 govarguz

To build an egg file to upload to PyPl, one basically needs a setup.py calling cmake, see: https://github.com/sim-x/simx/blob/master/setup.py for an example.

junghans avatar Jul 22 '16 23:07 junghans

Is is planned as source only? The SciPy/NumPy/PyPI peoples recently worked significantly to propose working Linux binary packages from pip, see https://www.python.org/dev/peps/pep-0513/

Managing C/C++ dependencies via pip is not trivial, their approach seems robust though. They use a VM image that they tested for compatibility to build distributable binary wheels.

pdebuyl avatar Aug 02 '16 14:08 pdebuyl

Why they want to duplicate the work of package managers? Perhaps for Windows/MacOS people that's useful but for Linux users.. I did some experiments here: https://github.com/MrTheodor/espressopp/tree/pypi right now, it's possible to call setup.py install and build, export to pypi and the pip install espressopp also works correctly (tested on testpypi server) but install fails due to the paths. That's because I call cmake and make directly from the setup.py which seems to work locally but not with the pip.

jkrajniak avatar Aug 02 '16 16:08 jkrajniak

If you pip install espressopp, it will install missing Python dependencies via pip (thus compiling on the way numpy, and many more). This is very long. Also, do you include hdf5 as a dependency? Or do you rely on it being pre-installed?

One way around this is to have all the "regular" packages preinstalled, this is not always the case on users' machines.

One way to test the procedure is to have someone not using espressopp or related technology (boost, hdf5, numpy) to install the package, or using a fresh VM image. You can do pip install . to test without uploading.

pdebuyl avatar Aug 03 '16 08:08 pdebuyl

Here is a setuptools extension, which supports CMake: https://github.com/scikit-build/scikit-build

junghans avatar Jun 20 '18 18:06 junghans