kdev-python: Use CMake FindPython3

Björn Strömberg bjorn.stromberg86 at gmail.com
Thu Jan 4 04:17:30 GMT 2024


during my quick tour of the cmake script i saw that there is a lot to
cleanup in the cmake.. this patch adresses a small part of it.

from a quick view of the patch in Kate you use the new facility to limit
the scope of python versions.
unsure on the top of my head if this actually was supported on cmake 3.12,
they added a few features along the way.

the python has to have --enabled-shared to work, i read that in a comment
or doc somewhere in the codebase..
the python 3.9 + 3.11 issue is kind of funny.. does your system have both
local compiled 3.9 and packaged 3.11 installed? that might be the reason.

i've only tested FindPython3 against cmake 3.27 and python 3.11 with my
early trial and errors around FindPython3 before i told myself,
that the whole CMake build system needed to be modernized/overhauled some
and that i did not have the time for that, its age shows,
and CI for testing a range of dependencies and their versions like cmake
and python is missing.

anyway +1 on Sven's request to get a account on invent.kde.org the gitlab
instance and using merge requests,
is not perfect but its better then patch files since you can overview the
whole files that have been changed, and all that have not.


Regards
Björn

On Wed, Jan 3, 2024 at 11:36 PM Sven Brauch <mail at svenbrauch.de> wrote:

> Hi,
>
> thanks for the patch, looks like something that needs to be fixed.
>
> On 03.01.24 15:31, Casian Andrei wrote:
> > Tested with a local compiled python3.9. When the python3.9 was compiled
> > without --enable-shared, CMake didn't work, as expected. When compiled
> > with --enable-shared, CMake worked fine. Built ok, but for some reason
> > tried to link kdevpythonlanguagesupport.so to a nonexistent python3.11
> > library.
>
> Did this work with the old code?
>
> It would be much appreciated if you could register on invent.kde.org and
> submit a pull request.
>
> Greetings,
> Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20240104/ca30796c/attachment-0001.htm>


More information about the KDevelop-devel mailing list