From df3f05e03ba671dd6be502ccae96d2a6162d29d4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 4 Jun 2020 11:03:07 -0700 Subject: [PATCH 1/2] build/make/Makefile.in [SCRIPT_PACKAGE_templ]: cd into the SPKG directory; adjust spkg-install scripts --- build/make/Makefile.in | 4 ++-- build/pkgs/sage_conf/spkg-install | 2 +- build/pkgs/texlive/spkg-install | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/make/Makefile.in b/build/make/Makefile.in index 16396e3e9ec..22f092245aa 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -574,7 +574,7 @@ endif # $(3): package dependencies define SCRIPT_PACKAGE_templ $$(INST)/$(1)-$(2): $(3) - $(AM_V_at)cd '$$(SAGE_ROOT)' && \ + $(AM_V_at)cd '$$(SAGE_ROOT)/build/pkgs/$(1)' && \ . '$$(SAGE_ROOT)/src/bin/sage-env' && . '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \ sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1).log' touch "$$@" @@ -582,7 +582,7 @@ $$(INST)/$(1)-$(2): $(3) $(1): $$(INST)/$(1)-$(2) $(1)-clean: - -$(AM_V_at)cd '$$(SAGE_ROOT)' && \ + -$(AM_V_at)cd '$$(SAGE_ROOT)/build/pkgs/$(1)' && \ . '$$(SAGE_ROOT)/src/bin/sage-env' && . '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \ '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-uninstall' -rm -f "$$(INST)/$(1)-$(2)" diff --git a/build/pkgs/sage_conf/spkg-install b/build/pkgs/sage_conf/spkg-install index bdb5c41ac95..468970ba085 100755 --- a/build/pkgs/sage_conf/spkg-install +++ b/build/pkgs/sage_conf/spkg-install @@ -9,4 +9,4 @@ if [ $? -ne 0 ]; then echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?" exit 1 fi -cd $SAGE_ROOT/build/pkgs/sage_conf/src && sdh_pip_install . +cd src && sdh_pip_install . diff --git a/build/pkgs/texlive/spkg-install b/build/pkgs/texlive/spkg-install index c78d70af19c..7291d2fcf0d 100755 --- a/build/pkgs/texlive/spkg-install +++ b/build/pkgs/texlive/spkg-install @@ -1 +1 @@ -exec sage-python23 build/pkgs/texlive/spkg-install.py +exec sage-python23 spkg-install.py From 72346ef564fec76ad2a8411b837afbb107cb14e5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 4 Jun 2020 12:07:36 -0700 Subject: [PATCH 2/2] Update developer manual on script packages --- src/doc/en/developer/packaging.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index 33b8305721e..6b4e6c2d9b1 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -307,8 +307,9 @@ A script package has a single install script named ``spkg-install``. It needs to be an executable shell script; it is not subject to the templating described in the previous section. -Sage runs ``spkg-install`` from the ``$SAGE_ROOT`` directory in the environment -obtained by sourcing the files ``src/bin/sage-env`` and ``build/bin/sage-build-env-config``. +Sage runs ``spkg-install`` from the directory ``$SAGE_ROOT/build/pkgs/`` +in the environment obtained by sourcing the files ``src/bin/sage-env`` and +``build/bin/sage-build-env-config``. .. _section-sdh-helpers: