libAtoms / matscipy

Materials science with Python at the atomic-scale
http://libatoms.github.io/matscipy/
GNU Lesser General Public License v2.1
188 stars 55 forks source link

Add pyproject.toml and potentials change build system #116

Closed pastewka closed 1 year ago

pastewka commented 2 years ago

We should as a pyproject.toml file and at least switch to declarative setuptools build. My suggestion would be to additionally switch to Meson as a build environment, see here: https://thiblahute.gitlab.io/mesonpep517/pyproject.html

jameskermode commented 2 years ago

Good idea - this would probably help with the failing Windows builds too (see #106, currently preventing MACE from adding matscipy as a dependency despite a huge performance speed up from switching to our neighbour list).

pastewka commented 2 years ago

I'm not sure what Meson support for Windows is - should check. The only other build system I am aware of is scikit-build which uses CMake under the hood: https://scikit-build.readthedocs.io/en/latest/usage.html - However, Meson seems more modern and better designed.

jameskermode commented 2 years ago

Yes, I've also had a brief look at Meson and think it looks good. There's also pants but it's probably over-the-top for us.

pastewka commented 2 years ago

Never heard of pants, will look into it. But it looks like they don't support C-code at present.

eli-schwartz commented 2 years ago

I'm not sure what Meson support for Windows is - should check.

Well, SciPy (and WIP for NumPy) is using Meson for Windows builds as well. :)

As far as pants goes, it seems like it's yet another bazel derivative? I question how that's supposed to work with pip install from an sdist, whereas Meson has a PEP 517 build backend (actually two of them, https://pypi.org/project/meson-python/ is a newer one that was built for SciPy).

pastewka commented 2 years ago

I've just switched another project over to Meson, it was fantatically simple: https://github.com/ContactEngineering/SurfaceTopography/pull/255 - will do the same for matscipy

pastewka commented 1 year ago

Closed with #117 , thanks for the great work @prs513rosewood and @jameskermode