Conda builds
With a few tweaks, it should now be possible to build and install PyFVCOM using conda, which provides greater flexibility with respect to the handling of dependencies (e.g. basemap).
To do this, install miniconda3 in a location of your choosing. Then, activate conda; add the conda-forge channel; and install conda-build and conda-verify, which we will use to install PyFVCOM. For example:
$ source /opt/miniconda/miniconda3/bin/activate
$ conda config --append channels conda-forge
$ conda install conda-build conda-verify
The above code will install miniconda3 into the directory /opt/miniconda
, once the appropriate write permissions have been set (the default is to install miniconda3 into your home directory, which is, of course, also fine).
With miniconda3 installed and configured, create a new environment in which to install PyFVCOM using the following commands:
$ conda create -n pyfvcom
$ conda activate pyfvcom
Next, clone PyFVCOM using git. The code below assumes that you have configured ssh access to GitLab:
$ mkdir -p $HOME/code/git/fvcom && cd $HOME/code/git/fvcom
$ git clone git@gitlab.ecosystem-modelling.pml.ac.uk/fvcom/pyfvcom.git
$ cd pyfvcom
$ git checkout dev
Next, open up setup.cfg and comment out user in the install section - this will prevent conda from trying to install PyFVCOM is your user space rather than the new conda environment you have created.
Finally, build and install PyFVCOM using conda:
$ conda build .
$ conda install -c local PyFVCOM
This is a local build. However, it is now a fairly simple procedure to submit the package to anaconda, which would make it possible to install PyFVCOM in one command. Is this desirable?