ESMG/pyroms

Improve installation process and documentation thereof

Opened this issue · 2 comments

Improve installation process and documentation thereof

The current installation instructions (I've only looked at the python3 branch) are to run "python setup.py install" in the pyroms, pyroms_toolbox and bathy_smoother subdirectories. When I do this on Linux, everything gets built except the scrip extension, required by pyroms, and the lpsolve55 extension, required by bathy_smoother. I intend to improve things by:

  • Converting README to Markdown format and rewriting the instructions;
  • Suggesting "pip install" instead of "python setup.py install" because the former allows clean uninstallations;
  • Mentioning editable installs ("pip install -e" or "python setup.py develop");
  • Noting that lpsolve55 is available as a Conda module;
  • Submitting a simplified and better-documented makefile for SCRIP with more complete installation instructions

I have done most of the coding and will prepare the pull request next week.

I have various other things I would like to do (PyPI package, Conda-Forge package, Windows support, getting rid of the need for special treatment for lpsolve55 and scrip) but I have to learn to walk before I can run.

4 days ago I prepared a pull request (#24) that implements the changes described above. When I prepared that pull request I was under the impression that lpsolve55, though included in the source tree , is not built and that this is why a warning is issued when importing bathy_smoother. I see now that an lpsolve55 shared-object file is built. However apparently it is not valid as when importing I get:

ImportError: dynamic module does not define module export function (PyInit_lpsolve55)

Given that lpsolve55 is now available separately on GitHub.com and Conda-Forge I suggest that it be removed from PyROMS and listed as a dependency. I am preparing a new commit to implement this.