setuptools version required
I've encountered a problem where building wheels for Windows fails in the MSVC build chain. This problem appears to be fixed with the current version of setuptools (66.0), and when I change the pyproject.toml to drop the requirement of setuptools<60, everything gets built ok.
I understand that the <60 requirement comes from this recommendation:
numpy.distutils is only tested with setuptools < 60.0, newer versions may break. See Interaction of numpy.distutils with setuptools <https://numpy.org/doc/stable/reference/distutils_status_migration.html#numpy-setuptools-interaction> for details.
https://numpy.org/doc/stable/reference/distutils_status_migration.html
They say it *may* break, but clearly it still doesn't. Would it be ok if, in the interest of receiving the latest bug fixes from setuptools, we'll either drop the '<60' requirement, or at least upgrade it to '<=66' ?
I prefer the 1st option, since it gets us the latest stuff until numpy.distutils really breaks, which may never happen.
I will also take on myself to look into moving forward from numpy.distutils, but I'd appreciate any direction on that. If someone already looked into it I'd love to hear.
Hi Yosef,
On 2/16/23 13:36, Yosef Meller wrote:
I've encountered a problem where building wheels for Windows fails in the MSVC build chain. This problem appears to be fixed with the current version of setuptools (66.0), and when I change the pyproject.toml to drop the requirement of setuptools<60, everything gets built ok.
I understand that the <60 requirement comes from this recommendation:
numpy.distutils is only tested with setuptools < 60.0, newer versions may break. See Interaction of numpy.distutils with setuptools <https://numpy.org/doc/stable/reference/distutils_status_migration.html#numpy-setuptools-interaction> for details.
https://numpy.org/doc/stable/reference/distutils_status_migration.html
They say it *may* break, but clearly it still doesn't. Would it be ok if, in the interest of receiving the latest bug fixes from setuptools, we'll either drop the '<60' requirement, or at least upgrade it to '<=66' ?
I prefer the 1st option, since it gets us the latest stuff until numpy.distutils really breaks, which may never happen.
OK, let us try that. SfePy does not use much functionality from numpy.distutils apart from the Configuration class, which may or may not be ported to setuptools.
I will also take on myself to look into moving forward from numpy.distutils, but I'd appreciate any direction on that. If someone already looked into it I'd love to hear.
That would be great, thanks! SciPy and then NumPy replaced numpy.distutils with Meson, clearing the path for other projects to follow. So IMO that would be a good choice also for SfePy. According to the migration advice you linked it might be even sufficient to just use setuptools: "if you have modest needs (only simple Cython/C extensions, and perhaps nested setup.py files)" defines our use pretty well. I have not much of an idea which of the two options would be better, but we are trying to reduce the amount of the C/Cython code, so maybe going with setuptools would be sufficient (provided it works for us).
r.
On Thu, Feb 16, 2023 at 11:36 PM Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
They say it *may* break, but clearly it still doesn't. Would it be ok if, in the interest of receiving the latest bug fixes from setuptools, we'll either drop the '<60' requirement, or at least upgrade it to '<=66' ?
I prefer the 1st option, since it gets us the latest stuff until numpy.distutils really breaks, which may never happen.
OK, let us try that. SfePy does not use much functionality from numpy.distutils apart from the Configuration class, which may or may not be ported to setuptools.
Opened a PR: https://github.com/sfepy/sfepy/pull/943
I will also take on myself to look into moving forward from numpy.distutils, but I'd appreciate any direction on that. If someone already looked into it I'd love to hear.
That would be great, thanks! SciPy and then NumPy replaced numpy.distutils with Meson, clearing the path for other projects to follow. So IMO that would be a good choice also for SfePy. According to the migration advice you linked it might be even sufficient to just use setuptools: "if you have modest needs (only simple Cython/C extensions, and perhaps nested setup.py files)" defines our use pretty well. I have not much of an idea which of the two options would be better, but we are trying to reduce the amount of the C/Cython code, so maybe going with setuptools would be sufficient (provided it works for us).
I just started brushing up against that and made some experiments. Opened an issue to track the onging effort (including link to my very small branch): https://github.com/sfepy/sfepy/issues/944
participants (2)
-
Robert Cimrman
-
Yosef Meller