~ruther/guix-local

27ba3604d47f741a09357164022aecea09c281c3 — Nicolas Graves 9 months ago 62ea5f5
build-system: pyproject: Add -sP flags for entry-point wrapper.

Fixes guix/guix#1118.

-P: prevents adding current working directory or script's directory to
the search path for modules.

-s: Prevent USER site-packages
directory (~/.local/lib/pythonX.Y[t]/site-packages) from being
included in the search path for modules.

* guix/build/pyproject-build-system (create-entrypoints)
[create-script]: Add -sP flags, improve pythonic style.

Change-Id: Iabc7bb59bf08be1e0c662a069a30ae17a53c7fd5
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M guix/build/pyproject-build-system.scm
M guix/build/pyproject-build-system.scm => guix/build/pyproject-build-system.scm +1 -1
@@ 346,7 346,7 @@ and return write it to PATH/NAME."
          ;; Technically the script could also include search-paths,
          ;; but having a generic 'wrap phases also handles manually
          ;; written entry point scripts.
          (format port "#!~a
          (format port "#!~a -sP
# Auto-generated entry point script.
import sys
from ~a import ~a