Em Wed, 03 Sep 2025 08:29:34 +0200 Johannes Berg <johannes@xxxxxxxxxxxxxxxx> escreveu: > On Tue, 2025-09-02 at 12:58 -0600, Jonathan Corbet wrote: > > > > > > The idea is not to override the search path: instead, to use it to > > > check if the user installed other /usr/bin/python3.* files (or on > > > some other part of PATH). Most distributions nowadays come with > > > multiple python versions. I can't see a downside (*) of not using > > > a newer version that the user had installed on his system and > > > has it on PATH. > > > > But overriding the path is exactly what this would be doing. It doesn't > > seem right to say "we know better than you do" and circumvent the > > configured path; the user may well have reasons for setting things up > > the way they did. > > Absolutely! Please don't ever do this. > > For example, use case we have: using nix-shell to lock down the software > used to build, for reproducible builds and similar reasons. Without -- > pure, PATH may still contain (last!) software from the system itself, > but it should basically never be used. if the PATH is mangled, you'll have a lot more problems than just building docs as it will pick wrong exec files anyway. In the particular case of docs, if you have, for instance, two different python versions, one with sphinx and another one without it, it may pick the wrong one, causing the build to fail. There's nothing the build system can do to solve it. The proper fix would be to wrap the calling logic to save the env before running under nix-shell, restoring env afterwards. Thanks, Mauro