This is a summary of the last few months of intermittent arguing over the build system. I am glossing over most details as the specifics are not important to the summary, and I'm too lazy to track down every post on the matter.

Just before the 1.0 release Fred Wright submitted a patch to solve the problem of waf installing python libraries in places that did not show up in sys.path. This fix worked by checking sys.path to see if the install path that python's distutils package returned was added, and if not to install somewhere that was in sys.path at the time. The code had a known issue with paths that didn't yet exist but would after the install not being in sys.path. In practice the patch resulted in a default install (/usr/local/) on some systems installing in /usr/, violating the FHS in the process.

This spawned frequent intermittent arguments with the broad sides being {better to have the import Just Work}, {violating FHS is unacceptable}. Various other solutions were proposed or attempted, each one usually breaking something else (often in a brittle way), each time this happened it drew another person into the argument, peaking at 5 I believe. Today (Jan 05, 2018) I ripped out fix_python_config.py, and restored the warnings about PYTHONPATH. Here is my reasoning:

* The fix_python_config.py solution stomps on privileged directories at times which cannot be predicted by the code. Even if the FHS did not exist this would be very Bad Form Ol' Chap.

* The old way (now the current way) means that on some distributions the user has to fiddle with their environment to add a .pth file or PYTHONPATH. This is not good either, but it has zero chance of damaging anything, anyone installing NTPsec is highly unlikely to have difficulty with it, and the cherry on top is that serious issues are upstream's problem to fix.

* .pth files are apparently not a solution that works generally, as well as requiring modification of /usr/, thus violating FHS.

* Embedding the paths directly into the python programs works great, in all situations. Right up until it doesn't. One problem is that the Gentoo installation workflow is based around moving things around temporary directories several times during the process. My initial instinct upon seeing this fix was that it was horrible and brittle, but I didn't think of the exact reason why and all the other solutions seemed to be other forms of terrible so I went with it. I should have trusted my instinct here.

TL;DR: we have gone back to the old way. If someone wants a better solution feel free to propose it, *after* showing that it will not break FHS, break if the user's assumptions are slightly different from ours, or break because a feature is only available on a handful of systems.

--
/"In the end; what separates a Man, from a Slave? Money? Power? No. A Man Chooses, a Slave Obeys."/ -- Andrew Ryan

/"Utopia cannot precede the Utopian. It will exist the moment we are fit to occupy it."/ -- Sophia Lamb

_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to