Fresh installation mailman3-suite via "pipx" - any experiences yet?
I recently found the "pipx" wrapper very useful and wanted to ask you if this could be facilitate the fresh installation of the mailman3-suite. Has anyone in the list already experiences installing mailman and mailmanweg through "pipx"?
Here are my general tipps for using pipx
# https://pipx.pypa.io/stable/installation/#on-linux
sudo apt install pipx python3-venv
To install a package systemwide for all users, I recommend the tip from https://github.com/pypa/pipx/issues/754#issuecomment-951162846 .
sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install <package>
On Thu, Jan 25, 2024 at 4:43 PM Wikinaut <mail@tgries.de> wrote:
I recently found the "pipx" wrapper very useful and wanted to ask you if this could be facilitate the fresh installation of the mailman3-suite. Has anyone in the list already experiences installing mailman and mailmanweg through "pipx"?
Here are my general tipps for using pipx
# https://pipx.pypa.io/stable/installation/#on-linux
sudo apt install pipx python3-venv
To install a package systemwide for all users, I recommend the tip from https://github.com/pypa/pipx/issues/754#issuecomment-951162846 .
sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install <package>
Hey! You have a penchant for mailmanweg, instead of mailmanweb! Enegwey (anyway, as we say in Kenya) if pipx doesn't create a virtual environment, then there is no difference with installing MM3 using apt! apt install foobar pipx install foobar The fact that you can give pipx some environment variables doesn't make it some form of virtualization/containerization, or does it? Looking at the old paths, pipx behaved like an MM3 installation method without activating the virtual environment. That was a mess as binaries weren't installed in the correct $PATH. I can't wrap my head around the new platformdirs.user_data_dir()/pipx/*. Let me stop yapping :-)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 1/25/24 12:20, Odhiambo Washington wrote:
On Thu, Jan 25, 2024 at 4:43 PM Wikinaut <mail@tgries.de> wrote:
I recently found the "pipx" wrapper very useful and wanted to ask you if this could be facilitate the fresh installation of the mailman3-suite. Has anyone in the list already experiences installing mailman and mailmanweg through "pipx"? ...
if pipx doesn't create a virtual environment, then there is no difference with installing MM3 using apt!
pipx apparently does create virtual environments. See https://pipx.pypa.io/stable/comparisons/
The thing there that concerns me is "pipx replaces a subset of pip's functionality; it lets you install cli applications but NOT libraries that you import in your code."
What does this say about the multiple dependencies that we install.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro writes:
On Thu, Jan 25, 2024 at 4:43 PM Wikinaut <mail@tgries.de> wrote:
I recently found the "pipx" wrapper very useful and wanted to ask you if this could be facilitate the fresh installation of the mailman3-suite. Has anyone in the list already experiences installing mailman and mailmanweg through "pipx"?
pipx apparently does create virtual environments. See https://pipx.pypa.io/stable/comparisons/
The thing there that concerns me is "pipx replaces a subset of pip's functionality; it lets you install cli applications but NOT libraries that you import in your code."
What does this say about the multiple dependencies that we install.
I'm pretty sure it will install dependencies. I think (everything I say below is based on reading the README.md from pipx's pypa.io repo, so caveat installer) that the complexity that will arise is that (for example) a naive approach like
$ pipx install mailman $ pipx install mailmanweb $ pipx install postorius $ pipx install hyperkitty
will create 4 separate venvs with 3 copies of mailmanclient, 3 copies of django-mailman3, and two copies of Django. Besides the space waste, there's also the small problem that mailmanweb won't have copies of postorius and hyperkitty in its venv. :-þ pipx has an "inject" command that allows adding other packages to a venv, but I think this means that pipx has no great advantage over the standard way of installing mailman into a venv.
pipx also installs stuff into the user's $HOME, specifically into ~/.local/share/pipx/venvs which I think will be kind of annoying if you need to dig into package resources. (I expect that you will still install configs into /etc/mailman3 and various data into /var/lib/mailman3/var or /opt/mailman3 or whatever without a problem.) This would only be an issue for heavy-duty customizers. This can probably be customized.
One of the big advantages pipx touts is "look ma, no sudo". That's not really an advantage for system daemons, though.
So bottom line is you can do it, but you'll need to study up on pipx arcana, because Mailman is a bunch of daemon it buys you very little, and the result won't look like any Mailman installation you've seen described on mailman-users or StackExchange.
Steve
On 1/26/24 07:06, Stephen J. Turnbull wrote:
I'm pretty sure it will install dependencies. I think (everything I say below is based on reading the README.md from pipx's pypa.io repo, so caveat installer) that the complexity that will arise is that (for example) a naive approach like
$ pipx install mailman $ pipx install mailmanweb $ pipx install postorius $ pipx install hyperkitty
will create 4 separate venvs with 3 copies of mailmanclient, 3 copies of django-mailman3, and two copies of Django.
But postorius and hyperkitty are dependencies of mailmanweb so only
$ pipx install mailman $ pipx install mailmanweb
should be required. This should put core in one venv and everything else in another without redundancy.
Besides the space waste, there's also the small problem that mailmanweb won't have copies of postorius and hyperkitty in its venv.
But it will because they are dependencies of mailmanweb.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
This is exactly what I expected as the supposed "solution". Has anyone tried that already ? Does it work?
Mark Sapiro writes:
But postorius and hyperkitty are dependencies of mailmanweb so only
Are they? I'm pretty sure that in my current project which has a pre-existing archiver they wish to keep using I only installed postorius, not hyperkitty. ... oops, HyperKitty *is* there. OK, need to uninstall that.
That's actually a bit annoying, since mailmanweb is a friendlier interface for control of either of HyperKitty and Postorius than the underlying Django utilities even if you don't want the other and its unique dependencies (such as Whoosh). (Issue #32 created)
OK, so your two-venv approach should actually work. I still don't think it's much of a win since to finish setup you still have to do a lot of work as root and a lot of work outside of pipx's control. Basically it saves one "python3 -m venv", at the cost of "pipx run" to run each program in its own venv. Note, it doesn't save me any venv activationss because I put that in the mailman user's shell .rc.
Wikinaut asks:
Has anyone tried that already?
Why not you?
Steve
participants (4)
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull
-
Wikinaut