]> arthur.barton.de Git - bup.git/commit
Stash the env PYTHONPATH during startup and restore it in main
authorRob Browning <rlb@defaultvalue.org>
Sat, 13 Feb 2021 19:14:19 +0000 (13:14 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 28 Mar 2021 21:16:52 +0000 (16:16 -0500)
commit2d75bd3a846095042688e9e743a13958311cd931
treea5f7abfd0c20199bc4de64fa6b98f9e000843c0c
parent99ef9690ff25077a311eb7cf630c4c21acf8289c
Stash the env PYTHONPATH during startup and restore it in main

We have to set the PYTHONPATH from bup.c so that Py_Main will be able
to find bup.*, but we don't want that change to affect subprocesses,
so stash the original PYTHONPATH in bup_main.env_pythonpath, and
restore the original environment value once we've made it to the
python side (in bup.main).

Thanks to Johannes Berg for pointing out some issues with a previous
version of the changes.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/main.py
lib/cmd/bup.c