paudetseis / Telewavesim

Teleseismic body wave modeling through stacks of (submarine/anisotropic) layers
https://paudetseis.github.io/Telewavesim/
MIT License
66 stars 18 forks source link

move to meson build system #49

Open trichter opened 7 months ago

trichter commented 7 months ago

Occasionally we should move from numpy.distutils to meson. I think telewavesim cannot be installed alongside python3.12 due to setuptools/numpy.distutils conflicts. numpy.distutils is also removed from numpy.

khannema commented 1 month ago

Hi there, I have troubles installing telewavesim as I run in the following error, while trying to install it via pip:

Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "~/src/Telewavesim/setup.py", line 3, in from numpy.distutils.core import setup, Extension ModuleNotFoundError: No module named 'numpy.distutils' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

As I think this is related to the issue trichter pointed out above I hope someone knows a way to fix this.

trichter commented 1 month ago

As a work-around you can try to install in a conda environment with an old numpy and python version.

The following is working for me:

conda create -n telews -c conda-forge "python=3.10" "numpy<1.22" obspy pytest fortran-compiler
conda activate telews
pip install telewavesim
pytest -v --pyargs telewavesim  # run tests
khannema commented 1 month ago

Thank you for your quick reply, we did the same here as a workaround and setup an environment with python 3.10.