rapidfuzz / RapidFuzz

Rapid fuzzy string matching in Python using various string metrics
https://rapidfuzz.github.io/RapidFuzz/
MIT License
2.61k stars 116 forks source link

Build requirements issue: PEP517 build from sdist fails #396

Closed radoering closed 1 month ago

radoering commented 1 month ago

rapidfuzz defines the following build-requires:

https://github.com/rapidfuzz/RapidFuzz/blob/685252dddee9f16bef8c298f01c0bf5d8f04c11d/pyproject.toml#L3-L4

However, it looks like scikit-build 0.17.* is not compatible with the latest setuptools so that a pep517 build of rapidfuzz fails with

  File "/tmp/pip-install-ow77o4fv/rapidfuzz_312413af3a934e5aa35448753ccd577e/_custom_build/backend.py", line 9, in <module>
    from skbuild.cmaker import get_cmake_version as _get_cmake_version
  File "/tmp/pip-build-env-q86uqxab/overlay/lib/python3.10/site-packages/skbuild/__init__.py", line 10, in <module>
    from .setuptools_wrap import setup
  File "/tmp/pip-build-env-q86uqxab/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 31, in <module>
    from .command import (
  File "/tmp/pip-build-env-q86uqxab/overlay/lib/python3.10/site-packages/skbuild/command/test.py", line 5, in <module>
    from setuptools.command.test import test as _test
ModuleNotFoundError: No module named 'setuptools.command.test'

The skbuild/command/test.py was removed in scikit-build 0.18 and setuptools.command.test was removed in setuptools 72. I think there are two options:

PS: We noticed this issue in the FreeBSD tests of Poetry, e.g. python-poetry/poetry#9427

maxbachmann commented 1 month ago

I published a new version using scikit-build 0.18