<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Hi Fons,<br>
      <br>
      Christopher Arndt sent a long and detailed answer, here's a
      shorter one.<br>
      <br>
      Python packages can be installed in user's home or virtual
      environments.<br>
      For example, to install the zita tools in my home environment, I
      cd to the zita-audiotools-1.3.0 directory, then used: <br>
      pip install .<br>
      <br>
      Installation was successful, so I used the same method for
      zita-jacktools.<br>
      It includes the .so modules:<br>
      ls $HOME/.local/lib/python3.*/site-packages/zita_*tools/<br>
      <br>
      For completion I uninstalled the packages in my home:<br>
      pip uninstall zita-audiotools zita-jacktools<br>
      Then I deleted the makefiles and reinstalled the packages (using
      same method).<br>
      <br>
      I also reinstalled them globally using:<br>
      sudo pip install .<br>
      It worked too:<br>
      ls /usr/local/lib/python3.*/dist-packages/zita_*tools/*<br>
      <br>
      There's newer configuration methods, but for now there's no need
      to update your packages, apart from removing the makefiles (and
      update the documentation).<br>
      <br>
      Marc<br>
      <br>
      Le 2022-08-15 à 08 h 30, Fons Adriaensen a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:20220815123001.ihjqja4x5s6kupij@mail1.linuxaudio.cyso.net">
      <pre class="moz-quote-pre" wrap="">Hello all,

I have some mixed python/C++ packages, e.g. zita-audiotools
and zita-jacktools.

To install these I expect the following to happen:

1. The C++ parts are compiled and combined into a *.so
   file which is a python extension.
2. The *.so and the python parts, any data etc. get
   installed into the user's /usr/lib/python*.*/site-packages.

To make this as easy as possible I provide a setup.py and a 
Makefile, so that all that should be required is:

make; sudo make install

Originally this used distutils, when that got 'deprecated'
this changed to setuptools. So until recently the Makefile
was something like: 

----
PY = /usr/bin/python3

build:
    $(PY) ./setup.py build

install:
    $(PY) ./setup.py install

clean:
    $(PY) ./setup.py clean
    rm -rf build dist zita_jacktools.egg-info
---

Then I got warnings telling me that calling setup.py directly
is now  also deprecated, and that I should use 'official tools'
to build and install. What exactly that means I was unable to
find out, but the following seems to work:

----
PY = /usr/bin/python3

build:
    $(PY) -m build -w

install:
    pip install --force-reinstall dist/*.whl

clean:
    rm -rf build dist *.egg-info *~
----

But this still produces a warning:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">WARNING: Running pip as the 'root' user can result in broken
permissions and conflicting behaviour with the system package
manager. It is recommended to use a virtual environment instead.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Now clearly installing things in site-packages requires root,
so what is then the recommended method ?? And why the virtual
environment (which is used by build anyway) ??

If anyone can shed some light on this mess he/she will deserve
my eternal gratitude.

Ciao,

</pre>
    </blockquote>
    <br>
    <div id="grammalecte_menu_main_button_shadow_host" style="width:
      0px; height: 0px;"></div>
  </body>
</html>