cheshirekow / cmake_format

Source code formatter for cmake listfiles.
GNU General Public License v3.0
941 stars 103 forks source link

exception: PackageNotFoundError with Python 3.12.3 #343

Closed higaski closed 2 months ago

higaski commented 2 months ago

cmake-format stopped working on my Arch system a couple of days ago. Simply calling cmake-format throws an exception:

Exception has occurred: PackageNotFoundError
No package metadata was found for cmakelang
StopIteration: 

During handling of the above exception, another exception occurred:

  File "/usr/bin/cmake-format", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/cmake-format", line 33, in <module>
    sys.exit(load_entry_point("cmakelang==0.6.13", "console_scripts", "cmake-format")())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
importlib.metadata.PackageNotFoundError: No package metadata was found for cmakelang

I guess this is caused by some upstream changes in Python? I'm currently running Python 3.12.3, any ideas how to work around that issue?

lahwaacz commented 2 months ago

Most likely you just forgot to rebuild the cmake-format package from AUR after the upgrade to Python 3.12...

higaski commented 2 months ago

God I'm stupid. Thanks.