Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Ivan Perez Newsgroups: linux.debian.maint.python Subject: Re: Recommended way of installing system-wide python application and libraries Date: Mon, 18 Dec 2023 00:30:02 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Sun Dec 17 23:26:50 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-5.109 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 X-Gm-Message-State: AOJu0YzNhD25LaOYAU7HsUbSIOgPozajvaoFV9kPX86HqynqIIuWCKPB ntnCcJe73MH+LQOF6DuPVp1jdhQuQlCn8lG+qsv1/HWZ45qmmw== X-Google-SMTP-Source: AGHT+IGIlnR21j/P33L9l50Pq6Ne5xL+bEb8R4LZZpgVS4FDaTYzUztmniGbCkaxA8qvW1h+cHot1ejRWWPUTHNErus= X-Received: by 2002:a2e:98c6:0:b0:2cc:65f9:24c with SMTP id s6-20020a2e98c6000000b002cc65f9024cmr545197ljj.25.1702855585568; Sun, 17 Dec 2023 15:26:25 -0800 (PST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000481a85060cbcf617" X-Mailing-List: archive/latest/21312 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CACZKWEJ18u2RMkbZgQa=mPaV4S9moxYZ72xxD3nCdtSPtWgqSg@mail.gmail.com Approved: robomod@news.nic.it Lines: 210 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Sun, 17 Dec 2023 15:25:48 -0800 X-Original-Message-ID: X-Original-References: Xref: csiph.com linux.debian.maint.python:15367 --000000000000481a85060cbcf617 Content-Type: text/plain; charset="UTF-8" Thanks!! I'll answer to the last comment but I appreciate everyone's input! Hello again Ivan (different neighborhood :)), :))) The "modern" way of building Python libraries/applications seems to be to > use a pyproject.toml. The pyproject.toml specifies a backend build system > that knows how to build the library/application and produce a wheel. Thanks for this pointer. I didn't know about this. As far as how to do this within an existing cmake project, unfortunately, > there doesn't seem to be a clear/easy way. For now, we ended up switching to venvs. I just published a release candidate. https://github.com/NASA-SW-VnV/ikos/discussions/253 Following @salvo's comment, I'm going to try and begin the process of packaging this for debian. I suspect it may be a bit complicated because ikos is two things (a library in C++ and a set of tools in Python) under a trench coat. This is by far not my domain. If anyone is willing to lend a hand, I could definitely use any help that I can get, but I understand that folks are busy and everybody wants help. Cheers, Ivan On Thu, 7 Dec 2023 at 16:12, Scott Talbert wrote: > On Tue, 5 Dec 2023, Ivan Perez wrote: > > > Hi everyone! > > > > I'm currently trying to bring a tool we have at NASA Ames up to speed: > > https://github.com/NASA-SW-VnV/ikos > > > > IKOS is a static analyzer for C. I'm really hoping that IKOS can be > included > > in Debian in the near future. > > > > IKOS is implemented as a C++ library, and a number of python > > tools/wrappers. The tools call mains in modules defined in a python > library > > `ikos`. > > > > As of right now, our CMakeFiles attempt to install everything (by > default) > > under /opt/ikos/. > > > > I'm having lots of issues getting the python portions installed > system-wide. > > I initially upgraded distutils to setuptools, but a recent update is now > > asking that I use a venv. More details and a link to a dockerfile can be > > found here: https://github.com/NASA-SW-VnV/ikos/discussions/241. > > > > While I can hack a solution that "works" (either by making a venv under > the > > target dir or by means of break-system-packages), I'd prefer to use > > recommended practices, and also conform to the way that things are done > in > > Debian/Ubuntu. > > > > What would be the recommended way of installing IKOS system-wide in > Debian? > > Hello again Ivan (different neighborhood :)), > > The "modern" way of building Python libraries/applications seems to be to > use a pyproject.toml. The pyproject.toml specifies a backend build system > that knows how to build the library/application and produce a wheel. > > As far as how to do this within an existing cmake project, unfortunately, > there doesn't seem to be a clear/easy way. The only cmake example I can > think off of the top of my head is cvc5. It still uses setup.py though, > so not a great future-looking example (and I had to patch it to build the > Python bindings in Debian): > https://github.com/cvc5/cvc5/blob/main/src/api/python/CMakeLists.txt > > If you're open to other options for building python libraries, meson might > be something to look into. I haven't used it extensively, though. It > does seem to have better support for building Python though. > > Regards, > Scott --000000000000481a85060cbcf617 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks!! I'll answer to the last comment but I ap= preciate everyone's input!

Hello again Ivan (different neighborhood :)),=
:)))

The "modern" way of building Python libraries/applications seems to be to
use a pyproject.toml.=C2=A0 The pyproject.toml specifies a backend build sy= stem
that knows how to build the library/application and produce a wheel.

Thanks for this pointer. I didn't know about = this.

As far as how to do this within an existing cmake project, unfortunately, <= br> there doesn't seem to be a clear/easy way.

For now, we ended up switching to venvs. I just p= ublished a release candidate.


Following @salvo's co= mment, I'm going to try and begin the process of packaging this for deb= ian. I suspect it may be a bit complicated because ikos is two things (a li= brary in C++ and a set of tools in Python) under a trench coat.
<= br>
This is by far not my domain. If anyone is willing to lend a = hand, I could definitely use any help that I can get, but I understand that= folks are busy and everybody wants help.

Cheers,<= /div>

Ivan



On Thu, 7 Dec 2023 at 16:12, Scott Talbert <swt@techie.net> wrote:
On Tue, 5 Dec 2023, Ivan Perez wrote:

> Hi everyone!
>
> I'm currently trying to bring a tool we have at NASA Ames up to sp= eed:
> https://github.com/NASA-SW-VnV/ikos
>
> IKOS is a static analyzer for C. I'm really hoping that IKOS can b= e included
> in Debian in the near future.
>
> IKOS is implemented as a=C2=A0 C++ library, and a number of python
> tools/wrappers. The tools call mains in modules defined in a python li= brary
> `ikos`.
>
> As of right now, our CMakeFiles attempt to install everything (by defa= ult)
> under /opt/ikos/.
>
> I'm having lots of issues getting the python portions installed sy= stem-wide.
> I initially upgraded distutils to setuptools, but a recent update is n= ow
> asking that I use a venv. More details and a link to a dockerfile can = be
> found here: https://github.com/NASA-SW-VnV/i= kos/discussions/241.
>
> While I can hack a solution that "works" (either by making a= venv under the
> target dir or by means of break-system-packages), I'd prefer to us= e
> recommended practices, and also conform to the way that things are don= e in
> Debian/Ubuntu.
>
> What would be the recommended way of installing IKOS system-wide in De= bian?

Hello again Ivan (different neighborhood :)),

The "modern" way of building Python libraries/applications seems = to be to
use a pyproject.toml.=C2=A0 The pyproject.toml specifies a backend build sy= stem
that knows how to build the library/application and produce a wheel.

As far as how to do this within an existing cmake project, unfortunately, <= br> there doesn't seem to be a clear/easy way.=C2=A0 The only cmake example= I can
think off of the top of my head is cvc5.=C2=A0 It still uses setup.py thoug= h,
so not a great future-looking example (and I had to patch it to build the <= br> Python bindings in Debian):
https://github.com/cvc5/cvc5/blo= b/main/src/api/python/CMakeLists.txt

If you're open to other options for building python libraries, meson mi= ght
be something to look into.=C2=A0 I haven't used it extensively, though.= =C2=A0 It
does seem to have better support for building Python though.

Regards,
Scott
--000000000000481a85060cbcf617--