rapidfuzz / RapidFuzz

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

Build issue with nightly build of CMake #381

Closed clin1234 closed 5 months ago

clin1234 commented 6 months ago

While building rapidfuzz as a dependency of poetry, I got the following error:

Collecting rapidfuzz<4.0.0,>=3.0.0 (from cleo<3.0.0,>=2.1.0->poetry)
  Using cached rapidfuzz-3.8.1.tar.gz (1.6 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "C:\Users\ךינשגכהד\scoop\apps\python-alpha\current\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "C:\Users\ךינשגכהד\scoop\apps\python-alpha\current\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\ךינשגכהד\scoop\apps\python-alpha\current\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ~~~~^^^^^^^^^^^^^^^^^
        File "C:\Users\ךינשגכהד\AppData\Local\Temp\pip-install-gsvwpkn1\rapidfuzz_3fe1994741fe4a1c90846276013f0a65\_custom_build\backend.py", line 91, in get_requires_for_build_wheel
          if _cmake_required():
             ~~~~~~~~~~~~~~~^^
        File "C:\Users\ךינשגכהד\AppData\Local\Temp\pip-install-gsvwpkn1\rapidfuzz_3fe1994741fe4a1c90846276013f0a65\_custom_build\backend.py", line 54, in _cmake_required
          if _version.parse(_get_cmake_version()) >= _version.parse("3.12"):
             ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\ךינשגכהד\AppData\Local\Temp\pip-build-env-yfmhhu_n\overlay\Lib\site-packages\packaging\version.py", line 54, in parse
          return Version(version)
                 ~~~~~~~^^^^^^^^^
        File "C:\Users\ךינשגכהד\AppData\Local\Temp\pip-build-env-yfmhhu_n\overlay\Lib\site-packages\packaging\version.py", line 200, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      packaging.version.InvalidVersion: Invalid version: '3.29.20240426-g5deef9c'

This is really an issue with pypi/packaging, see pypy/packaging#797

maxbachmann commented 6 months ago

This should be fixed by https://github.com/rapidfuzz/RapidFuzz/commit/fd0e3a674df9aea78dbbb7fd514e65ea130e7942 I can make a release with the fix later today.

clin1234 commented 6 months ago

Is the release here yet?

maxbachmann commented 6 months ago

Thanks for the reminder. A new build should be up now.