miili / pysurf96

Python wrapper for modelling surface wave dispersion curves from surf96 - Computer Programs in Seismology, R. Hermann
https://pyrocko.org
58 stars 18 forks source link

Use `scikit-build-core` to wrap pysurf96 #6

Open jwhhh opened 5 months ago

jwhhh commented 5 months ago

Hi team,

Thanks for this project - the wrapper has been very helpful for my work at @inlab-geo.

We came across python 3.12 recently and realised numpy is depcrecating disutils in python 3.12, causing failure to install this package too.

I've used scikit-build-core to build this package and hopefully it works under the new Python standard.

Best, Nancy

miili commented 5 months ago

Thanks for pointing this out! The deprecation of distutils is quite a big thing.

It would be great to use the setuptools variant, as described here

https://numpy.org/doc/stable/f2py/buildtools/skbuild.html#setuptools-replacement

jwhhh commented 5 months ago

I've read through the linked page, and was actually not sure how this works. It seems to me that you still have to use scikit-build and setuptools jointly, but the old scikit-build is about to be deprecated at some point (with the rewrite scikit-build-core being the stable version).

Please feel free to edit my pull request as you see fit too.