<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 2022-08-15 à 15 h 21, Fons
Adriaensen a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:20220815192154.jiowehnceoejvrkv@mail1.linuxaudio.cyso.net">
<pre class="moz-quote-pre" wrap="">One (metric) unit of Eternal Gratitude to both of you.</pre>
</blockquote>
<br>
One unit of "Fons Gratitude" is already a lot, but thanks (infinity
/ 2) times!<br>
<br>
<blockquote type="cite"
cite="mid:20220815192154.jiowehnceoejvrkv@mail1.linuxaudio.cyso.net">
<pre class="moz-quote-pre" wrap="">So
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">pip install .
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">will install to ~/.local/lib</pre>
</blockquote>
And when a virtualenv is activated, packages are installed in the
./lib sub-directory of the virtualenv directory.<br>
<br>
<blockquote type="cite"
cite="mid:20220815192154.jiowehnceoejvrkv@mail1.linuxaudio.cyso.net">
<pre class="moz-quote-pre" wrap="">while
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">sudo pip install .
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">will install to /usr/local/lib
I find the destination directory depending on who the user pretends
to be a bit strange, but it works !</pre>
</blockquote>
When installing with the root user, the default prefix is /usr/local
because /usr is usually managed by the system. <br>
<br>
But it's possible to install in /root/.local/lib, using:<br>
sudo pip install --user .<br>
<br>
Or as the root user, to install to your home directory, try:<br>
sudo su - fons pip install .<br>
<br>
The --user option is (now) the default, except when installing as
root.<br>
<br>
<blockquote type="cite"
cite="mid:20220815192154.jiowehnceoejvrkv@mail1.linuxaudio.cyso.net">
<pre class="moz-quote-pre" wrap="">The only minor problem is that the sudo version leaves two
directories (build and *.egg-info) that can only be cleaned up
by root. No problem on systems that allow sudo everything, but
I may keep the Makefile just to offer 'sudo make clean',
assuming most system will allow this. Unless there is a
cleaner solution.</pre>
</blockquote>
<br>
That could be something simple like:<br>
<br>
PY = env python3<br>
PIP = env pip3<br>
<br>
build:<br>
$(PIP) wheel .<br>
<br>
install:<br>
$(PIP) install --force-reinstall *.whl<br>
<br>
uninstall:<br>
$(PIP) uninstall zita-audiotools<br>
<br>
clean:<br>
rm -rf build *.egg-info *.whl<br>
<br>
<br>
Marc<br>
<div id="grammalecte_menu_main_button_shadow_host" style="width:
0px; height: 0px;"></div>
</body>
</html>