Re: kdev-python: Use CMake FindPython3

Björn Strömberg <[email protected]> Thu, 4 Jan 2024 05:17:30 +0100
Newsgroups gmane.comp.kde.devel.kdevelop
Message-ID <CAHo5mS1HBa48xi9se77rdhjBD7PriQkce7CJcqgrct8vz_dJvA@mail.gmail.com>
--0000000000004a1bfc060e17039d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=C3=B6rn

On Wed, Jan 3, 2024 at 11:36=E2=80=AFPM Sven Brauch <mail-ITmcY+a7/[email protected]> wr=
ote:

> 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
>

--0000000000004a1bfc060e17039d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">during my quick tour of the cmake script =
i saw that there is a lot to cleanup in the cmake.. this patch adresses a s=
mall part of it.</div><div dir=3D"ltr"><br></div><div>from a quick view of =
the patch in Kate you use the new facility to limit the scope of python ver=
sions.=C2=A0</div><div>unsure on the top of my head if this actually was su=
pported on cmake 3.12, they added a few features along the way.=C2=A0=C2=A0=
</div><div><br></div><div>the python has to have --enabled-shared to work, =
i read that in a comment or doc somewhere in the codebase..</div><div>the p=
ython 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.</div><d=
iv><br></div><div>i&#39;ve only tested FindPython3 against cmake 3.27 and p=
ython 3.11 with my early trial and errors around FindPython3 before i told =
myself,=C2=A0</div><div>that the whole CMake build system needed to be mode=
rnized/overhauled some and that i did not have the time for that, its age s=
hows,=C2=A0</div><div>and CI for testing a range of dependencies and their =
versions like cmake and python is missing.</div><div><br></div><div>anyway=
=C2=A0+1 on Sven&#39;s request to get a account on <a href=3D"http://invent=
.kde.org">invent.kde.org</a> the gitlab instance and using merge requests,=
=C2=A0</div><div>is not perfect but its better then patch files since you c=
an overview the whole files that have been changed, and all that have not.<=
/div><div><br></div><div><br></div><div>Regards</div><div>Bj=C3=B6rn</div><=
br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed,=
 Jan 3, 2024 at 11:36=E2=80=AFPM Sven Brauch &lt;<a href=3D"mailto:mail@sve=
nbrauch.de">mail-ITmcY+a7/[email protected]</a>&gt; wrote:<br></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex">Hi,<br>
<br>
thanks for the patch, looks like something that needs to be fixed.<br>
<br>
On 03.01.24 15:31, Casian Andrei wrote:<br>
&gt; Tested with a local compiled python3.9. When the python3.9 was compile=
d <br>
&gt; without --enable-shared, CMake didn&#39;t work, as expected. When comp=
iled <br>
&gt; with --enable-shared, CMake worked fine. Built ok, but for some reason=
 <br>
&gt; tried to link kdevpythonlanguagesupport.so to a nonexistent python3.11=
 <br>
&gt; library.<br>
<br>
Did this work with the old code?<br>
<br>
It would be much appreciated if you could register on <a href=3D"http://inv=
ent.kde.org" rel=3D"noreferrer" target=3D"_blank">invent.kde.org</a> and <b=
r>
submit a pull request.<br>
<br>
Greetings,<br>
Sven<br>
</blockquote></div></div>

--0000000000004a1bfc060e17039d--