Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- run: ./tools/calculate_installer_hash.sh
- run: |
installer -verbose -pkginfo -pkg ./${SP_INSTALLER_NAME}
installer -verbose -dominfo -pkg ./${SP_INSTALLER_NAME}
installer -verbose -volinfo -pkg ./${SP_INSTALLER_NAME}
installer -verbose -pkginfo -pkg ./${PKG_INSTALLER_NAME}
installer -verbose -dominfo -pkg ./${PKG_INSTALLER_NAME}
installer -verbose -volinfo -pkg ./${PKG_INSTALLER_NAME}
- uses: actions/upload-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}
path: ${{ env.PROJECT_NAME }}-*.*
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

Expand All @@ -96,7 +96,7 @@ jobs:
- run: ./tools/calculate_installer_hash.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}
path: ${{ env.PROJECT_NAME }}-*.*
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
- run: ./tools/calculate_installer_hash.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}
path: ${{ env.PROJECT_NAME }}-*.*
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

Expand All @@ -151,16 +151,16 @@ jobs:
- run: ./tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}
- name: Run installer
run: |
sudo installer -verbose -pkg ${SP_INSTALLER_NAME} -target / \
sudo installer -verbose -pkg ${PKG_INSTALLER_NAME} -target / \
|| ( tail -n 30 /var/log/install.log && exit 1 ) # display last log messages on error
# Check the list of packages that were actually installed by the installer.
- run: ./tools/export_frozen_env_def.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}-json
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}-json
path: ${{ env.PROJECT_NAME }}-*.env.json
# upload just one for each installer version
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
Expand Down Expand Up @@ -189,12 +189,12 @@ jobs:
- run: ./tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
- run: sh ./${SP_INSTALLER_NAME} -b
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}
- run: sh ./${PKG_INSTALLER_NAME} -b
- run: ./tools/export_frozen_env_def.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}-json
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}-json
path: ${{ env.PROJECT_NAME }}-*.env.json
# upload just one for each installer version
if: matrix.os == 'ubuntu-24.04'
Expand All @@ -221,15 +221,15 @@ jobs:
- run: ./tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}
# https://docs.anaconda.com/anaconda/install/silent-mode.html#windows
- run: .\%SP_INSTALLER_NAME% /S /InstallationType=JustMe /AddToPath=1
- run: .\%PKG_INSTALLER_NAME% /S /InstallationType=JustMe /AddToPath=1
timeout-minutes: 30
shell: cmd
- run: ./tools/export_frozen_env_def.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}-json
name: ${{ env.PKG_INSTALLER_ARTIFACT_ID }}-json
path: ${{ env.PROJECT_NAME}}-*.env.json
# upload just one for each installer version
if: matrix.os == 'windows-2022'
Expand All @@ -250,10 +250,10 @@ jobs:
run:
shell: bash -el {0}
steps:
# These names should correspond to SP_INSTALLER_ARTIFACT_ID in tools/extract_version.sh
# These names should correspond to PKG_INSTALLER_ARTIFACT_ID in tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
pattern: ${{ env.PROJECT_NAME }}-Python-*
pattern: ${{ env.PROJECT_NAME }}-*
merge-multiple: true
- run: ls -al ./
- uses: ncipollo/release-action@v1
Expand Down
36 changes: 20 additions & 16 deletions assets/post_install_macOS.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash

# This script must be marked +x to work correctly with the installer!
#
# Available variables are those exported in:
# https://github.com/conda/constructor/blob/main/constructor/header.sh

set -eo pipefail

logger -p 'install.info' "ℹ️ Running the custom Scientific Python post-install script."
logger -p 'install.info' "ℹ️ Running the custom ${INSTALLER_NAME} post-install script."

# This doesn't appear to be working: even when the installer is run through
# sudo, SUDO_USER is unset. Leave it here for reference:
Expand All @@ -14,11 +17,11 @@ logger -p 'install.info' "ℹ️ Running the custom Scientific Python post-insta
# ☠️ This is ugly and bound to break, but seems to do the job for now. ☠️
# Don't name the variable USER, as this one is already set.
USER_FROM_HOMEDIR=`basename $HOME`
SPI_VERSION=`basename "$(dirname $PREFIX)"`
PKG_VERSION=`basename "$(dirname $PREFIX)"`
logger -p 'install.info' "📓 USER_FROM_HOMEDIR=$USER_FROM_HOMEDIR"
logger -p 'install.info' "📓 DSTROOT=$DSTROOT"
logger -p 'install.info' "📓 PREFIX=$PREFIX"
logger -p 'install.info' "📓 SPI_VERSION=$SPI_VERSION"
logger -p 'install.info' "📓 PKG_VERSION=$PKG_VERSION"

# Guess whether it's a system-wide or only-me install
if [[ "$PREFIX" == "/Applications/"* ]]; then
Expand All @@ -28,22 +31,23 @@ else
APP_DIR="$HOME"/Applications
PERMS=""
fi
SPI_APP_DIR="${APP_DIR}/Scientific-Python"
logger -p 'install.info' "📓 SPI_APP_DIR=$SPI_APP_DIR"
PKG_APP_DIR="${APP_DIR}/${INSTALLER_NAME}"
logger -p 'install.info' "📓 PKG_APP_DIR=$PKG_APP_DIR"

logger -p 'install.info' "ℹ️ Moving root SP .app bundles from $APP_DIR to $SPI_APP_DIR."
$PERMS mv "$APP_DIR"/Scientific\ Python\ *.app "$SPI_APP_DIR"/
logger -p 'install.info' "ℹ️ Moving root project .app bundles from $APP_DIR to $PKG_APP_DIR."
# Set this to match the names generated from the menu package.
$PERMS mv "${APP_DIR}"/Scientific\ Python\ *.app "$PKG_APP_DIR"/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so I'm clear: it isn't possible to remove Scientific\ Python here too? IIUC this is for all the menu items, and there's no guarantee that they'll always have a nice clean prefix that glob-matches all of them... but in our case there is (by design). So in theory we could use a variable here for our installer, but it wouldn't generalize for use cases where the menu items have arbitrary names. Is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right - because we have the custom names in construct.yaml as you've described, it would work for us, but not for any other names someone chose. We could do all this by templating and filling out the templates in a pre-build step, but perhaps we could leave that for another time.


logger -p 'install.info' "ℹ️ Fixing permissions of SP .app bundles in $SPI_APP_DIR: new owner will be ${USER_FROM_HOMEDIR}."
$PERMS chown -R "$USER_FROM_HOMEDIR" "$SPI_APP_DIR"
logger -p 'install.info' "ℹ️ Fixing permissions of project .app bundles in $PKG_APP_DIR: new owner will be ${USER_FROM_HOMEDIR}."
$PERMS chown -R "$USER_FROM_HOMEDIR" "$PKG_APP_DIR"

SPI_ICON_PATH="${PREFIX}/Menu/spi_mac_folder_icon.png"
logger -p 'install.info' "ℹ️ Setting custom folder icon for $SPI_APP_DIR and $SPI_APP_DIR_ROOT to $SPI_ICON_PATH."
for destPath in "$SPI_APP_DIR" "$SPI_APP_DIR_ROOT"; do
logger -p 'install.info' "ℹ️ Setting custom folder icon for $destPath to $SPI_ICON_PATH."
PKG_ICON_PATH="${PREFIX}/Menu/spi_mac_folder_icon.png"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should genericize the image names too, to remove the spi_ prefix (maybe in a follow-up PR?)

logger -p 'install.info' "ℹ️ Setting custom folder icon for $PKG_APP_DIR and $PKG_APP_DIR_ROOT to $PKG_ICON_PATH."
for destPath in "$PKG_APP_DIR" "$PKG_APP_DIR_ROOT"; do
logger -p 'install.info' "ℹ️ Setting custom folder icon for $destPath to $PKG_ICON_PATH."
osascript \
-e 'set destPath to "'"${destPath}"'"' \
-e 'set iconPath to "'"${SPI_ICON_PATH}"'"' \
-e 'set iconPath to "'"${PKG_ICON_PATH}"'"' \
-e 'use framework "Foundation"' \
-e 'use framework "AppKit"' \
-e "set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath)" \
Expand Down Expand Up @@ -76,5 +80,5 @@ chown -R "$USER_FROM_HOMEDIR" "${PREFIX}"
logger -p 'install.info' "ℹ️ Running spi_sys_info."
${DSTBIN}/conda run -p ${PREFIX} ${PREFIX}/Menu/spi_sys_info.py nohtml || true

logger -p 'install.info' "ℹ️ Opening in Finder ${SPI_APP_DIR}/."
open -R "${SPI_APP_DIR}/"
logger -p 'install.info' "ℹ️ Opening in Finder ${PKG_APP_DIR}/."
open -R "${PKG_APP_DIR}/"
2 changes: 1 addition & 1 deletion recipes/scientific-python/construct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ specs:
- defusedxml =0.7.1 # https://github.com/tiran/defusedxml
# Development
- cython =3.1.1
- pytest =8.3.5
- pytest =8.4.0
- pytest-timeout =2.4.0
- pre-commit =4.2.0
- ruff =0.11.12
Expand Down
2 changes: 1 addition & 1 deletion tools/build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null &&
source ${SCRIPT_DIR}/extract_version.sh
echo "Building installer locally"
echo "--------------------------"
echo "Version: ${SP_INSTALLER_VERSION}"
echo "Version: ${PKG_INSTALLER_VERSION}"
echo "Recipe: ${RECIPE_DIR}"
echo "OS: ${MACHINE}"
echo "Machine: ${PYMACHINE}"
Expand Down
8 changes: 4 additions & 4 deletions tools/calculate_installer_hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ matches=(${PROJECT_NAME}-*-*.*)
echo "Extracting fname"
installer_fname="${matches[0]}"
echo "Found name: ${installer_fname}"
echo "Want name: ${SP_INSTALLER_NAME}"
test "$installer_fname" == "$SP_INSTALLER_NAME"
hash_fname="${SP_INSTALLER_NAME}.sha256.txt"
shasum -a 256 "$SP_INSTALLER_NAME" > "$hash_fname"
echo "Want name: ${PKG_INSTALLER_NAME}"
test "$installer_fname" == "$PKG_INSTALLER_NAME"
hash_fname="${PKG_INSTALLER_NAME}.sha256.txt"
shasum -a 256 "$PKG_INSTALLER_NAME" > "$hash_fname"
cat "$hash_fname"
24 changes: 12 additions & 12 deletions tools/check_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#grouping-log-lines

set -eo pipefail
echo "Running tests for SP_MACHINE=${SP_MACHINE}"
source "${SP_ACTIVATE}"
echo "Running tests for PKG_MACHINE=${PKG_MACHINE}"
source "${PKG_ACTIVATE}"

echo "::group::conda info"
conda info
Expand All @@ -19,10 +19,10 @@ pip list
echo "::endgroup::"

echo "::group::Platform specific tests"
if [[ "$SP_MACHINE" == "macOS" ]]; then
if [[ "$PKG_MACHINE" == "macOS" ]]; then
echo "Testing that file permissions are set correctly (owned by "$USER", not "root".)"
# https://unix.stackexchange.com/a/7733
APP_DIR=$(dirname $SP_INSTALL_PREFIX)
APP_DIR=$(dirname $PKG_INSTALL_PREFIX)
[ `ls -ld ${APP_DIR} | awk 'NR==1 {print $3}'` == "$USER" ] || exit 1

echo "Checking that the installed Python is a binary for the correct CPU architecture"
Expand All @@ -37,10 +37,10 @@ if [[ "$SP_MACHINE" == "macOS" ]]; then
ls -al $(APP_DIR)
echo "Checking that there are 5 directories"
test `ls -d ${APP_DIR}/*.app | wc -l` -eq 5 || exit 1
echo "Checking that the custom icon was set on the SP folder in ${APP_DIR}"
echo "Checking that the custom icon was set on the project folder in ${APP_DIR}"
test -f ${APP_DIR}/Icon$'\r' || exit 1
export SKIP_SP_KIT_GUI_TESTS=1
elif [[ "$SP_MACHINE" == "Linux" ]]; then
export SKIP_PKG_KIT_GUI_TESTS=1
elif [[ "$PKG_MACHINE" == "Linux" ]]; then
echo "Checking that menu shortcuts were created …"
pushd ~/.local/share/applications
ls -l || exit 1
Expand All @@ -66,8 +66,8 @@ fi
echo "::endgroup::"

echo "::group::Checking for pinned file..."
test -e "$SP_INSTALL_PREFIX/conda-meta/pinned"
grep "openblas" "$SP_INSTALL_PREFIX/conda-meta/pinned"
test -e "$PKG_INSTALL_PREFIX/conda-meta/pinned"
grep "openblas" "$PKG_INSTALL_PREFIX/conda-meta/pinned"
echo "::endgroup::"

echo "::group::Checking permissions"
Expand All @@ -78,18 +78,18 @@ echo "::endgroup::"

echo "::group::Checking the deployed environment variables were set correctly upon environment activation"
conda env config vars list
if [[ "$SP_MACHINE" == "macOS" && "$MACOS_ARCH" == "Intel" ]]; then
if [[ "$PKG_MACHINE" == "macOS" && "$MACOS_ARCH" == "Intel" ]]; then
python -c "import os; x = os.getenv('CONDA_SUBDIR'); assert x == 'osx-64', f'CONDA_SUBDIR ({repr(x)}) != osx-64'" || exit 1
fi
# TODO: broken on Windows!
if [[ "$SP_MACHINE" != "Windows" ]]; then
if [[ "$PKG_MACHINE" != "Windows" ]]; then
python -c "import os; x = os.getenv('PYTHONNOUSERSITE'); assert x == '1', f'PYTHONNOUSERSITE ({repr(x)}) != 1'" || exit 1
python -c "import os; x = os.getenv('MAMBA_NO_BANNER'); assert x == '1', f'MAMBA_NO_BANNER ({repr(x)}) != 1'" || exit 1
fi
echo "::endgroup::"

echo "::group::spi_sys_info"
python -u ${SP_INSTALL_PREFIX}/Menu/spi_sys_info.py nohtml
python -u ${PKG_INSTALL_PREFIX}/Menu/spi_sys_info.py nohtml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto here re: spi_ in filenames (not an image, but same logic may apply)

echo "::endgroup::"

echo "::group::Trying to import SP and all additional packages included in the installer"
Expand Down
6 changes: 3 additions & 3 deletions tools/export_frozen_env_def.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -eo pipefail

source "${SP_ACTIVATE}"
conda list --json > ${SP_INSTALLER_NAME}.env.json
cat ${SP_INSTALLER_NAME}.env.json
source "${PKG_ACTIVATE}"
conda list --json > ${PKG_INSTALLER_NAME}.env.json
cat ${PKG_INSTALLER_NAME}.env.json
66 changes: 33 additions & 33 deletions tools/extract_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
export CONSTRUCT_YML=$(find ${SCRIPT_DIR}/../recipes -name construct.yaml)
export RECIPE_DIR=$(dirname $CONSTRUCT_YML)
export SP_INSTALLER_VERSION=$(grep "^version: .*$" ${CONSTRUCT_YML} | cut -d' ' -f2)
export PKG_INSTALLER_VERSION=$(grep "^version: .*$" ${CONSTRUCT_YML} | cut -d' ' -f2)
export PROJECT_NAME=$(grep "^name: .*$" ${CONSTRUCT_YML} | cut -d' ' -f2)
export PYSHORT=$(python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
UNAME="$(uname -s)"
Expand Down Expand Up @@ -42,53 +42,53 @@ fi
export MACOS_ARCH=$MACOS_ARCH

if [[ "$MACHINE" == "macOS" ]]; then
SP_INSTALL_PREFIX="/Applications/${PROJECT_NAME}/.scientific-python"
SP_INSTALLER_NAME="${PROJECT_NAME}-${SP_INSTALLER_VERSION}-${MACHINE}_${MACOS_ARCH}.pkg"
SP_ACTIVATE="$SP_INSTALL_PREFIX/bin/activate"
PKG_INSTALL_PREFIX="/Applications/${PROJECT_NAME}/.scientific-python"
PKG_INSTALLER_NAME="${PROJECT_NAME}-${PKG_INSTALLER_VERSION}-${MACHINE}_${MACOS_ARCH}.pkg"
PKG_ACTIVATE="$PKG_INSTALL_PREFIX/bin/activate"
elif [[ "$MACHINE" == "Linux" ]]; then
SP_INSTALL_PREFIX="$HOME/${PROJECT_NAME}-Environment"
SP_INSTALLER_NAME="${PROJECT_NAME}-${SP_INSTALLER_VERSION}-${MACHINE}.sh"
SP_ACTIVATE="$SP_INSTALL_PREFIX/bin/activate"
PKG_INSTALL_PREFIX="$HOME/${PROJECT_NAME}-Environment"
PKG_INSTALLER_NAME="${PROJECT_NAME}-${PKG_INSTALLER_VERSION}-${MACHINE}.sh"
PKG_ACTIVATE="$PKG_INSTALL_PREFIX/bin/activate"
else
SP_INSTALL_PREFIX="$HOME/${PROJECT_NAME}-Environment"
SP_INSTALLER_NAME="${PROJECT_NAME}-${SP_INSTALLER_VERSION}-${MACHINE}.exe"
SP_ACTIVATE="$SP_INSTALL_PREFIX/Scripts/activate"
PKG_INSTALL_PREFIX="$HOME/${PROJECT_NAME}-Environment"
PKG_INSTALLER_NAME="${PROJECT_NAME}-${PKG_INSTALLER_VERSION}-${MACHINE}.exe"
PKG_ACTIVATE="$PKG_INSTALL_PREFIX/Scripts/activate"
fi

export SP_INSTALL_PREFIX="$SP_INSTALL_PREFIX"
export SP_INSTALLER_NAME="${SP_INSTALLER_NAME}"
export SP_ACTIVATE="$SP_ACTIVATE"
export SP_INSTALLER_ARTIFACT_ID="${PROJECT_NAME}-${MACHINE}-${ARTIFACT_ID_SUFFIX}"
export SP_MACHINE="$MACHINE"
export PKG_INSTALL_PREFIX="$PKG_INSTALL_PREFIX"
export PKG_INSTALLER_NAME="${PKG_INSTALLER_NAME}"
export PKG_ACTIVATE="$PKG_ACTIVATE"
export PKG_INSTALLER_ARTIFACT_ID="${PROJECT_NAME}-${MACHINE}-${ARTIFACT_ID_SUFFIX}"
export PKG_MACHINE="$MACHINE"

echo "Version: ${SP_INSTALLER_VERSION}"
test "$SP_INSTALLER_VERSION" != ""
echo "Version: ${PKG_INSTALLER_VERSION}"
test "$PKG_INSTALLER_VERSION" != ""
echo "System Python: ${PYSHORT}"
test "$PYSHORT" != ""
test -d "$SCRIPT_DIR"
echo "Recipe: ${RECIPE_DIR}"
test "$RECIPE_DIR" != ""
test -d "$RECIPE_DIR"
echo "Installer: ${SP_INSTALLER_NAME}"
test "$SP_INSTALLER_NAME" != ""
echo "Artifact ID: ${SP_INSTALLER_ARTIFACT_ID}"
test "$SP_INSTALLER_ARTIFACT_ID" != ""
echo "Prefix: ${SP_INSTALL_PREFIX}"
test "$SP_INSTALL_PREFIX" != ""
echo "Activate: ${SP_ACTIVATE}"
test "$SP_ACTIVATE" != ""
echo "Machine: ${SP_MACHINE}"
test "$SP_MACHINE" != ""
echo "Installer: ${PKG_INSTALLER_NAME}"
test "$PKG_INSTALLER_NAME" != ""
echo "Artifact ID: ${PKG_INSTALLER_ARTIFACT_ID}"
test "$PKG_INSTALLER_ARTIFACT_ID" != ""
echo "Prefix: ${PKG_INSTALL_PREFIX}"
test "$PKG_INSTALL_PREFIX" != ""
echo "Activate: ${PKG_ACTIVATE}"
test "$PKG_ACTIVATE" != ""
echo "Machine: ${PKG_MACHINE}"
test "$PKG_MACHINE" != ""

if [[ "$GITHUB_ACTIONS" == "true" ]]; then
echo "SP_INSTALLER_VERSION=${SP_INSTALLER_VERSION}" | tee -a $GITHUB_ENV
echo "SP_INSTALLER_NAME=${SP_INSTALLER_NAME}" | tee -a $GITHUB_ENV
echo "SP_INSTALLER_ARTIFACT_ID=${SP_INSTALLER_ARTIFACT_ID}" | tee -a $GITHUB_ENV
echo "SP_INSTALL_PREFIX=${SP_INSTALL_PREFIX}" | tee -a $GITHUB_ENV
echo "PKG_INSTALLER_VERSION=${PKG_INSTALLER_VERSION}" | tee -a $GITHUB_ENV
echo "PKG_INSTALLER_NAME=${PKG_INSTALLER_NAME}" | tee -a $GITHUB_ENV
echo "PKG_INSTALLER_ARTIFACT_ID=${PKG_INSTALLER_ARTIFACT_ID}" | tee -a $GITHUB_ENV
echo "PKG_INSTALL_PREFIX=${PKG_INSTALL_PREFIX}" | tee -a $GITHUB_ENV
echo "RECIPE_DIR=${RECIPE_DIR}" | tee -a $GITHUB_ENV
echo "SP_ACTIVATE=${SP_ACTIVATE}" | tee -a $GITHUB_ENV
echo "PKG_ACTIVATE=${PKG_ACTIVATE}" | tee -a $GITHUB_ENV
echo "NSIS_SCRIPTS_RAISE_ERRORS=1" | tee -a $GITHUB_ENV
echo "SP_MACHINE=${SP_MACHINE}" | tee -a $GITHUB_ENV
echo "PKG_MACHINE=${PKG_MACHINE}" | tee -a $GITHUB_ENV
echo "MACOS_ARCH=${MACOS_ARCH}" | tee -a $GITHUB_ENV
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
echo "ARTIFACT_RETENTION_DAYS=5" | tee -a $GITHUB_ENV
Expand Down
8 changes: 5 additions & 3 deletions tools/macos_check_installer_signature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
set -eo pipefail

if [[ "$GITHUB_EVENT_NAME" != "pull_request" ]]; then
pkgutil --check-signature ${SP_INSTALLER_NAME} || exit 1
pkgutil --check-signature ${PKG_INSTALLER_NAME} || exit 1
fi
# Now extract the package and check that the _conda binary is
# properly signed as well
pkgutil --expand-full ${SP_INSTALLER_NAME} ./sp-extracted
DIR="./sp-extracted/prepare_installation.pkg/Payload/.scientific-python"
pkgutil --expand-full ${PKG_INSTALLER_NAME} ./pkg-extracted
# Get pkg_name from construct.yaml file.
cons_pkg_name=$(basename $PKG_INSTALL_PREFIX)
DIR="./pkg-extracted/prepare_installation.pkg/Payload/${cons_pkg_name}"
echo "Checking ${DIR} exists"
test -d "$DIR"
ls -al "$DIR"
Expand Down
Loading