opengeostat / pygslib

GSLIB fortran code wrapped into python
MIT License
122 stars 55 forks source link

Pygslib not compiling #61

Open opengeostat opened 2 years ago

opengeostat commented 2 years ago

Pygslib was not compiling after starting a fresh conda installation and using these dependencies:

conda create --name pygslib-build python=3.9
conda activate pygslib-build
conda install cython setuptools numpy VC=14 vs2015_runtime libpython pytest m2w64-toolchain numpy pandas matplotlib scipy vtk colour bok

Note that I am using the compilers provided by conda at m2w64-toolchain

Added compiling tests at folder test_f2py_and_cython to test compilation with f2py and cython, and there were no errors.

The issue was in setup.py. There was a static argument extra_link_args= ['-static'] causing a problem with the compiler.

gslib_rotscale = Extension(name = 'pygslib.gslib.__rotscale',
                     sources = ['for_code/rotscale.f90'],
                                extra_link_args= ['-static'] )

Removing this line fixed the issue.

However, some concerns remain