Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
64777ea
Culling packages
matthew-brett May 12, 2025
4074ed3
Remove Vista and MNE-specific GUI tests.
matthew-brett May 12, 2025
6ffc064
Extend import check to all specs.
matthew-brett May 13, 2025
caf8b90
Remove darkdetect and qdarkstyle
matthew-brett May 13, 2025
d7ae7f4
Update versions
matthew-brett May 13, 2025
ed89291
Ruff reformatting
matthew-brett May 13, 2025
5eb5055
update logos
drammock May 12, 2025
ad5883d
update copyright in license
drammock May 12, 2025
6e65f09
WIP: update readme (some URLs TBD)
drammock May 12, 2025
e443d1e
update post-install scripts
drammock May 12, 2025
e5e9ca3
update pre- and post-install dialog text
drammock May 12, 2025
a74b6ac
fix folder name and prompt
drammock May 13, 2025
b3e6af6
update env var names
drammock May 13, 2025
df26d05
mne- ==> scientific-
drammock May 13, 2025
a95a1ee
more mne->scientific; reset version to 0.1.0
drammock May 13, 2025
6c82ec8
update notebook test
drammock May 13, 2025
f5d1ed7
fix(?) workflow defs
drammock May 13, 2025
0cfed07
Start sp-installer-menu
matthew-brett May 13, 2025
11a1ee2
Remove some more packages
matthew-brett May 14, 2025
e31e566
A few more MNE_ references.
matthew-brett May 14, 2025
cd1a84a
Remove more uses of MNE, generalize name, var
matthew-brett May 14, 2025
b14450f
Do not use a missing png file.
matthew-brett May 14, 2025
78ae736
Hardcode name and version in construct.yaml
matthew-brett May 14, 2025
dbf063a
Remove reference to .app
matthew-brett May 14, 2025
3aee757
Remove as-yet-unbuilt package from environment.
matthew-brett May 14, 2025
41ce625
Generalize local channel
matthew-brett May 14, 2025
cc4cff0
Try plumbing package build into GHA
matthew-brett May 14, 2025
1935ff5
Make icons etc specific to scientific Python.
matthew-brett May 14, 2025
4949a73
"A lot of changes picked up here"
matthew-brett May 14, 2025
c80dd6e
All sorts of hard-won wisdom.
matthew-brett May 15, 2025
f2e5413
Try fixes to Jupyter path.
matthew-brett May 15, 2025
4c1922f
Try a more comprehensive clean.
matthew-brett May 16, 2025
80cdbd2
Build package in custom local directory.
matthew-brett May 19, 2025
2df35db
[autofix.ci] apply automated fixes
autofix-ci[bot] May 19, 2025
1c997e0
Replace uses of MNE in tools
matthew-brett May 19, 2025
9aafb61
Add back test for mac folder icon.
matthew-brett May 19, 2025
d0a16d1
Add back test for packages.
matthew-brett May 19, 2025
cbe1850
Remove QT check.
matthew-brett May 20, 2025
6408e2d
[autofix.ci] apply automated fixes
autofix-ci[bot] May 20, 2025
63ebdb2
Turn off code signing check for now.
matthew-brett May 20, 2025
980cd60
Change name of output directory for tests.
matthew-brett May 20, 2025
ea3b209
misc cleanups
drammock May 19, 2025
9bc9a7b
overhaul sysinfo script
drammock May 19, 2025
851e43e
ruff
drammock May 19, 2025
d0956a8
overhaul sysinfo script
drammock May 20, 2025
33daf04
cleanups
drammock May 20, 2025
859d33d
more cleanups
drammock May 20, 2025
a4f46c0
make Makefile platform-aware (WIP)
drammock May 20, 2025
3ef0a42
typo
drammock May 20, 2025
baa6d3b
clean thoroughly
drammock May 20, 2025
0417c41
Try some fixes to counts for Linux desktop
matthew-brett May 20, 2025
6dc2317
Fix quotes for macOS postinstall.
matthew-brett May 20, 2025
538c0e7
Remove set to default QT backend.
matthew-brett May 20, 2025
4f7a102
standardize names, fix URLs, remove generic launcher
drammock May 20, 2025
ea81bb7
add (and use) jupyter icons
drammock May 20, 2025
8aab8f2
fix one test
drammock May 20, 2025
4fe5b9b
Remove version from output directory.
matthew-brett May 21, 2025
63d5425
Move applications into Scientific-Python folder.
matthew-brett May 21, 2025
8cdb7fb
Copy Jupyter stuff into Menu folder.
matthew-brett May 21, 2025
32eb78d
Stop opening double terminals.
matthew-brett May 21, 2025
d25b51f
Attempt to fix test for apps in Application folder.
matthew-brett May 21, 2025
fd4cc04
[autofix.ci] apply automated fixes
autofix-ci[bot] May 21, 2025
3a6d5b3
Remove dev check (test removed a while ago).
matthew-brett May 21, 2025
b9e2385
fix another test
drammock May 21, 2025
c80e731
Move installation prefix.
matthew-brett May 21, 2025
53f7c38
Fixes for test_imports
matthew-brett May 21, 2025
c6d3362
Adapt GUI test.
matthew-brett May 21, 2025
efc3069
[autofix.ci] apply automated fixes
autofix-ci[bot] May 21, 2025
91e470a
Directly check package name rather than build number.
matthew-brett May 21, 2025
d84a006
Do no ask for sp-installer-menu build string.
matthew-brett May 21, 2025
1858f53
Fix for want_versions
matthew-brett May 21, 2025
da4f79c
Assert actual backend on Windows (QTAgg)
matthew-brett May 22, 2025
b0c6855
Revert "Stop opening double terminals."
matthew-brett May 22, 2025
fb8f0df
In fact Linux seems to use QTAgg, like Windows.
matthew-brett May 22, 2025
32f42b2
Move terminal-ness to platform specific parts.
matthew-brett May 22, 2025
7e40243
fix clean recipe on Linux
drammock May 22, 2025
0fd3594
WIP test fixes
drammock May 22, 2025
40b9963
Remove reference to MNE
matthew-brett May 22, 2025
91f21ea
Set Jupyter paths to avoid user's setup.
matthew-brett May 23, 2025
75352ae
Ignore ipynb_checkpoints
matthew-brett May 24, 2025
db4b841
Add use to license.
matthew-brett May 24, 2025
1d33a10
[autofix.ci] apply automated fixes
autofix-ci[bot] May 24, 2025
7ceb5a9
Slightly rewrite license.
matthew-brett May 24, 2025
47abb53
Make spi_sys_info executable.
matthew-brett May 24, 2025
f203422
Fix application directory opened by install.
matthew-brett May 24, 2025
f7b451a
Try enabling post-install sys-info.
matthew-brett May 24, 2025
5e05d23
Preserve permissions in copy
matthew-brett May 24, 2025
7e0d695
[autofix.ci] apply automated fixes
autofix-ci[bot] May 27, 2025
1c3bb07
Workaround for conda activation error.
matthew-brett May 28, 2025
aac7c8e
[autofix.ci] apply automated fixes
autofix-ci[bot] May 28, 2025
d6619e9
Refine, comment on and fix logic for .bat init
matthew-brett May 28, 2025
c605777
Refactor Windows prompt activation.
matthew-brett May 29, 2025
e237bf3
use stdout instead of browser for post-install sysinfo
drammock May 29, 2025
782690b
docstring lint; wording tweak
drammock May 29, 2025
78c320a
whitespace
drammock May 29, 2025
6dc0750
remove cruft comment
drammock May 29, 2025
72e4544
Update sp-installer-menu/LICENSE.txt
drammock May 29, 2025
0cf7452
[autofix.ci] apply automated fixes
autofix-ci[bot] May 29, 2025
be8494a
Update README.md
drammock May 29, 2025
1bd472d
remove no-test flag on menu package build
drammock May 29, 2025
8754bf5
update mac folder icon
drammock May 29, 2025
dfb6c62
comment out installer screenshot in README
drammock May 29, 2025
51cf331
make the "install" recipe platform-specific
drammock May 29, 2025
6a90ad2
change windows runners (2019 is almost EOL)
drammock May 30, 2025
6b104bc
restore --no-test flag on windows build
drammock May 30, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
jobs:
autobot:
runs-on: ubuntu-latest
if: (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]') && github.repository == 'mne-tools/mne-installers'
if: (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]') && github.repository == 'scientific-python/installer'
steps:
- name: Enable auto-merge for bot PRs
run: gh pr merge --auto --squash "$PR_URL"
Expand Down
55 changes: 29 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
# Replace a set of _name variables (that have # [osx] comments with
# an particular string (is this the certificate ID?)
sed -i "" "s/_name: *# \[osx\]/_name: 9779L28NP8 # \[osx\]/" ${RECIPE_DIR}/construct.yaml
- run: conda-build sp-installer-menu --no-anaconda-upload --croot conda-bld
- run: ./tools/run_constructor.sh
timeout-minutes: 20
- run: ./tools/macos_check_installer_signature.sh
Expand All @@ -61,13 +62,13 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- run: ./tools/calculate_installer_hash.sh
- run: |
installer -verbose -pkginfo -pkg ./${MNE_INSTALLER_NAME}
installer -verbose -dominfo -pkg ./${MNE_INSTALLER_NAME}
installer -verbose -volinfo -pkg ./${MNE_INSTALLER_NAME}
installer -verbose -pkginfo -pkg ./${SP_INSTALLER_NAME}
installer -verbose -dominfo -pkg ./${SP_INSTALLER_NAME}
installer -verbose -volinfo -pkg ./${SP_INSTALLER_NAME}
- uses: actions/upload-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}
path: MNE-Python-*.*
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
path: Scientific-Python-*.*
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

build_linux:
Expand All @@ -86,13 +87,14 @@ jobs:
with:
environment-file: environment.yml
- run: ./tools/extract_version.sh
- run: conda-build sp-installer-menu --no-anaconda-upload --croot conda-bld
- run: ./tools/run_constructor.sh
timeout-minutes: 20
- run: ./tools/calculate_installer_hash.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}
path: MNE-Python-*.*
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
path: Scientific-Python-*.*
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

build_windows:
Expand All @@ -101,7 +103,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019]
os: [windows-2022]
defaults:
run:
shell: bash -el {0}
Expand All @@ -113,13 +115,14 @@ jobs:
# https://nsis.sourceforge.io/Download
- run: conda install -c conda-forge -y "nsis==3.08"
- run: ./tools/extract_version.sh
- run: conda-build sp-installer-menu --no-test --no-anaconda-upload --croot conda-bld
- run: ./tools/run_constructor.sh
timeout-minutes: 20
- run: ./tools/calculate_installer_hash.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}
path: MNE-Python-*.*
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
path: Scientific-Python-*.*
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

# Test
Expand All @@ -145,17 +148,17 @@ jobs:
- run: ./tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
- name: Run installer
run: |
sudo installer -verbose -pkg ${MNE_INSTALLER_NAME} -target / \
sudo installer -verbose -pkg ${SP_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.MNE_INSTALLER_ARTIFACT_ID }}-json
path: MNE-Python-*.env.json
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}-json
path: Scientific-Python-*.env.json
# upload just one for each installer version
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
- uses: pyvista/setup-headless-display-action@main
Expand Down Expand Up @@ -183,13 +186,13 @@ jobs:
- run: ./tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}
- run: sh ./${MNE_INSTALLER_NAME} -b
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
- run: sh ./${SP_INSTALLER_NAME} -b
- run: ./tools/export_frozen_env_def.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}-json
path: MNE-Python-*.env.json
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}-json
path: Scientific-Python-*.env.json
# upload just one for each installer version
if: matrix.os == 'ubuntu-24.04'
- uses: pyvista/setup-headless-display-action@main
Expand All @@ -205,7 +208,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -215,16 +218,16 @@ jobs:
- run: ./tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
name: ${{ env.MNE_INSTALLER_ARTIFACT_ID }}
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}
# https://docs.anaconda.com/anaconda/install/silent-mode.html#windows
- run: .\%MNE_INSTALLER_NAME% /S /InstallationType=JustMe /AddToPath=1
- run: .\%SP_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.MNE_INSTALLER_ARTIFACT_ID }}-json
path: MNE-Python-*.env.json
name: ${{ env.SP_INSTALLER_ARTIFACT_ID }}-json
path: Scientific-Python-*.env.json
# upload just one for each installer version
if: matrix.os == 'windows-2022'
- uses: pyvista/setup-headless-display-action@main
Expand All @@ -244,15 +247,15 @@ jobs:
run:
shell: bash -el {0}
steps:
# These names should correspond to MNE_INSTALLER_ARTIFACT_ID in tools/extract_version.sh
# These names should correspond to SP_INSTALLER_ARTIFACT_ID in tools/extract_version.sh
- uses: actions/download-artifact@v4
with:
pattern: MNE-Python-*
pattern: Scientific-Python-*
merge-multiple: true
- run: ls -al ./
- uses: ncipollo/release-action@v1
with:
artifacts: "MNE-Python-*.*"
artifacts: "Scientific-Python-*.*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ tests/.joblib_cache
.pytest_cache
.DS_Store
__pycache__
conda-bld/
.ipynb_checkpoints/
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
BSD 3-Clause License

Copyright (c) 2021, MNE-Python Developers
Copyright (c) 2021, MNE-Python Developers and
Copyright (c) 2025, Scientific-Python Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -13,7 +14,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
3. Neither the name of the copyright holders nor the names of their
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand Down
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Makefile targets for local build steps on Mac.
SHELL := bash
MENU_PKG_NAME=sp-installer-menu
ROOT_PREFIX=$(shell conda config --show root_prefix | cut -d ' ' -f 2)
ENV_PKGS=$(ROOT_PREFIX)/pkgs

UNAME := "$(shell uname -s)"
ifeq ($(findstring Linux,$(UNAME)),Linux)
MACHINE=Linux
else ifeq ($(findstring Darwin,$(UNAME)),Darwin)
MACHINE=macOS
else ifeq ($(findstring MINGW64_NT,$(UNAME)),MINGW64_NT)
MACHINE=Windows
else ifeq ($(FINDSTRING MSYS_NT,$(UNAME)),MSYS_NT)
MACHINE=Windows
else
MACHINE="UNKNOWN:$(UNAME)"
endif

all: menu-pkg installer

menu-pkg:
conda-build $(MENU_PKG_NAME) --no-anaconda-upload --croot conda-bld

installer:
constructor recipes/scientific-python

install:
@if [[ $(MACHINE) == "macOS" ]]; then \
installer -pkg Scientific-Python-*.pkg -target CurrentUserHomeDirectory; \
elif [[ $(MACHINE) == "Linux" ]]; then \
sh ./Scientific-Python-*-Linux.sh; \
elif [[ $(MACHINE) == "Windows" ]]; then \
echo "TODO add install command for Windows"; \
fi

clean:
@rm -rf conda-bld
@rm -rf ~/.conda/constructor/*/$(MENU_PKG_NAME)*
@if [[ $(MACHINE) == "macOS" ]]; then \
rm -rf ~/Applications/*Scientific*; \
rm -f Scientific-Python-*.pkg; \
elif [[ $(MACHINE) == "Linux" ]]; then \
rm -rf $(HOME)/Scientific-Python; \
rm -f ./Scientific-Python-*.sh; \
rm -f $(HOME)/.local/share/applications/scientific-python-*.desktop; \
elif [[ $(MACHINE) == "Windows" ]]; then \
echo "TODO add command to cleanup icons on Windows"; \
fi
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Installers for MNE-Python
# Installers for core Scientific Python packages

Installers for MNE-Python for macOS, Windows, and Linux.
Installers for the core Scientific Python packages for macOS, Windows, and Linux.

<img src="https://mne.tools/dev/_static/mne_installer_macOS.png" alt="Installer running on macOS" width="450px">
<!-- img src="https://TODO.png" alt="Screenshot of installer running on macOS" width="450px" -->

Please visit [the installers section of the MNE documentation](https://mne.tools/dev/install/installers.html) for instructions on how to use them.
Please visit [the release page](https://github.com/scientific-python/installer/releases/latest) to download an installer for your OS. <!-- TODO: replace with link to tutorial if/when written. -->

## Development

Expand Down
10 changes: 5 additions & 5 deletions assets/conclusion.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
\deftab720
\pard\pardeftab720\partightenfactor0

\f0\b\fs40 \cf2 \up0 \nosupersub \ulnone MNE-Python has been successfully installed!\
\f0\b\fs40 \cf2 \up0 \nosupersub \ulnone The Scientific Python environment has been successfully installed!\
\pard\pardeftab720\partightenfactor0

\f1\b0\fs22 \cf2 \
\
\pard\pardeftab720\partightenfactor0

\f2\fs32 \cf2 \uc0\u55357 \u56514
\f1 You can find MNE-Python in your Applications folder.\
\f2\fs32 \cf2 \uc0\u55357 \u56514
\f1 You can find Scientific Python in your Applications folder.\
\

\f2 \uc0\u55358 \u56599
\f1 Thank you for choosing MNE-Python!\
\f2 \uc0\u55358 \u56599
\f1 Thank you for choosing Scientific Python!\
}
Binary file modified assets/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/license.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
\pard\pardeftab720\partightenfactor0
\f1\b0 \cf2 \
Copyright \'a9 MNE-Python Developers\
Copyright \'a9 Scientific Python Developers\
Copy link
Member

Choose a reason for hiding this comment

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

I think we should acknowledge "MNE-Python Developers" here too, no?

All rights reserved.\
\
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\
Expand Down
2 changes: 1 addition & 1 deletion assets/license.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) MNE-Python Developers
Copyright (c) Scientific Python Developers
Copy link
Member

Choose a reason for hiding this comment

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

ditto on acknowledging MNE-Python devs too

All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions assets/post_install_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ ${PREFIX}/bin/conda env config vars set MAMBA_NO_BANNER=1
echo "ℹ️ Pinning BLAS implementation to OpenBLAS."
echo "libblas=*=*openblas" >>${PREFIX}/conda-meta/pinned

echo "ℹ️ Running mne sys_info."
${PREFIX}/bin/conda run mne sys_info || true
echo "ℹ️ Running spi_sys_info."
${PREFIX}/bin/conda run -p ${PREFIX} ${PREFIX}/Menu/spi_sys_info.py nohtml || true
40 changes: 18 additions & 22 deletions assets/post_install_macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -eo pipefail

logger -p 'install.info' "ℹ️ Running the custom MNE-Python post-install script."
logger -p 'install.info' "ℹ️ Running the custom Scientific Python 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 +14,11 @@ logger -p 'install.info' "ℹ️ Running the custom MNE-Python post-install scri
# ☠️ 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`
MNE_VERSION=`basename "$(dirname $PREFIX)"`
SPI_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' "📓 MNE_VERSION=$MNE_VERSION"
logger -p 'install.info' "📓 SPI_VERSION=$SPI_VERSION"

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

logger -p 'install.info' "ℹ️ Moving root MNE .app bundles from $APP_DIR to $MNE_APP_DIR."
$PERMS mv "$APP_DIR"/*\(MNE\).app "$MNE_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' "ℹ️ Fixing permissions of MNE .app bundles in $MNE_APP_DIR: new owner will be ${USER_FROM_HOMEDIR}."
$PERMS chown -R "$USER_FROM_HOMEDIR" "$MNE_APP_DIR"
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"

MNE_ICON_PATH="$PREFIX/Menu/mne.png"
logger -p 'install.info' "ℹ️ Setting custom folder icon for $MNE_APP_DIR and $MNE_APP_DIR_ROOT to $MNE_ICON_PATH."
for destPath in "$MNE_APP_DIR" "$MNE_APP_DIR_ROOT"; do
logger -p 'install.info' "ℹ️ Setting custom folder icon for $destPath to $MNE_ICON_PATH."
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."
osascript \
-e 'set destPath to "'"${destPath}"'"' \
-e 'set iconPath to "'"${MNE_ICON_PATH}"'"' \
-e 'set iconPath to "'"${SPI_ICON_PATH}"'"' \
-e 'use framework "Foundation"' \
-e 'use framework "AppKit"' \
-e "set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath)" \
Expand All @@ -68,17 +67,14 @@ ${DSTBIN}/conda env config vars set PYTHONNOUSERSITE=1
logger -p 'install.info' "ℹ️ Disabling mamba package manager banner."
${DSTBIN}/conda env config vars set MAMBA_NO_BANNER=1

logger -p 'install.info' "ℹ️ Configuring Matplotlib to use the Qt backend by default."
sed -i '.bak' "s/##backend: Agg/backend: qtagg/" ${PREFIX}/lib/python${PYSHORT}/site-packages/matplotlib/mpl-data/matplotlibrc

logger -p 'install.info' "ℹ️ Pinning BLAS implementation to OpenBLAS."
echo "libblas=*=*openblas" >> ${PREFIX}/conda-meta/pinned

logger -p 'install.info' "ℹ️ Fixing permissions of entire conda environment for user=${USER_FROM_HOMEDIR}."
chown -R "$USER_FROM_HOMEDIR" "${PREFIX}"

logger -p 'install.info' "ℹ️ Running mne sys_info."
${DSTBIN}/conda run mne sys_info || true
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 ${MNE_APP_DIR}/."
open -R "${MNE_APP_DIR}/"
logger -p 'install.info' "ℹ️ Opening in Finder ${SPI_APP_DIR}/."
open -R "${SPI_APP_DIR}/"
4 changes: 2 additions & 2 deletions assets/post_install_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ echo Disabling mamba package manager banner.
echo Pinning BLAS implementation to OpenBLAS.
echo libblas=*=*openblas >> "%PREFIX%\conda-meta\pinned"

echo Running mne sys_info.
"%PREFIX%\Scripts\conda" run mne sys_info || echo
echo Running spi_sys_info.
"%PREFIX%\Scripts\conda" run -p "%PREFIX%" "%PREFIX%\Menu\spi_sys_info.py" "nohtml" || echo
Binary file modified assets/welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading