[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recommended way of installing system-wide python application and libraries



On Tue, Dec 05, 2023 at 02:10:01AM -0800, 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?
This answer may not be useful for you but the only recommended way of
installing Python modules system-wide is by making a proper Debian package
for them using proper Debian Python packaging helpers, and the only other
recommended way of installing Python modules is venvs.
If I needed to install this I would use either of these two, depending on
whether I actually need to have it system-wide and whether I want an
official package uploaded to Debian.
Alternatively, as you mentioned /opt, if the software supports installing
*everything* in /opt (maybe it adds that to sys.path when it runs), then
doing that is also fine (as it doesn't touch things outside /opt and
cannot break those).


Reply to: