C and Fortran compilers. Tested with gcc suite. Some flags are specific to gcc suite.
pip install .
Note that there is a dot after install.
Unfortunately even though the code is correctly installed at the correct location, few issues are still pending.
import cylinder # should work
import cylinder.cyl # will fail
- One of the intermediate library is not seamlessly loaded with out user intervention. Add the directory of installation to $LD_LIBRARY_PATH. The directory of the installation can be found from
python -c "import cylinder; print(cylinder.__path__)"
- Slight modification of the f90wrap generated cyl.py is required. Open the cyl.py from the path identified in the previous step and change the line containing
import _cyl
toimport cylinder._cyl as _cyl
orfrom . import _cyl
. Now both lines should work
import cylinder # should work
import cylinder.cyl # should work
For additional details, refer to https://github.com/jameskermode/f90wrap/tree/master/examples/cylinder. Replace Example in https://github.com/jameskermode/f90wrap/blob/master/examples/cylinder/tests.py with cylinder.cyl.