Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 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
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 installers tutorial (link TODO)](https://TODO) for instructions on how to use them.

## 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\
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
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
7 changes: 5 additions & 2 deletions assets/post_install_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ ${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
# TODO later: make a standalone version of something like mne.sys_info(),
# but tailored to the Scientific Python stack. Probably that's a standalone
# post-install script that gets sourced here
# echo "ℹ️ Running mne sys_info."
# ${PREFIX}/bin/conda run mne sys_info || true
37 changes: 20 additions & 17 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,23 @@ 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_ROOT="${APP_DIR}/Scientific-Python"
SPI_APP_DIR="${SPI_APP_DIR_ROOT}/${SPI_VERSION}"
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 Scientific Python .app bundles from $APP_DIR to $SPI_APP_DIR."
$PERMS mv "$APP_DIR"/*\(ScientificPython\).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 Scientific Python .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/mne.png" # TODO FIXME where is this image coming from / what would be the equivalent for Scientific Python?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be this:

https://github.com/conda-forge/mne-feedstock/blob/main/recipe/menu/mne.png

That's an asset that's part of the mne-installer-menus feedstock:

https://github.com/conda-forge/mne-feedstock/blob/08355b8a5cd76fec2ae7d4e3d16245fdc754da5a/recipe/meta.yaml#L122

So this post-install script knows that the mne-installer-menus will be installed, and that its mne.png will land in Menu/mne.png. So we'll need to see if there is some place we can get a scientific Python PNG... if not, then we could create a conda-forge feedstock for it. Not sure what conda-forge project / recipe we would want to create for it...

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 Down Expand Up @@ -77,8 +77,11 @@ 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
# TODO later: make a standalone version of something like mne.sys_info(),
# but tailored to the Scientific Python stack. Probably that's a standalone
# post-install script that gets sourced here
# logger -p 'install.info' "ℹ️ Running mne sys_info."
# ${DSTBIN}/conda run mne sys_info || true

logger -p 'install.info' "ℹ️ Opening in Finder ${MNE_APP_DIR}/."
open -R "${MNE_APP_DIR}/"
7 changes: 5 additions & 2 deletions assets/post_install_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ 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
:: TODO later: make a standalone version of something like mne.sys_info(),
:: but tailored to the Scientific Python stack. Probably that's a standalone
:: post-install script that gets sourced here
:: echo Running mne sys_info.
:: "%PREFIX%\Scripts\conda" run mne sys_info || 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.
12 changes: 6 additions & 6 deletions assets/welcome.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
\deftab720
\pard\pardeftab720\partightenfactor0

\f0\b\fs40 \cf2 \up0 \nosupersub \ulnone Welcome to the MNE-Python installer!\
\f0\b\fs40 \cf2 \up0 \nosupersub \ulnone Welcome to the Scientific Python installer!\
\pard\pardeftab720\partightenfactor0

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

\f2\fs32 \cf2 \uc0\u55357 \u56446
\f1 This installer will guide you through the installation of MNE-Python.\
\f2\fs32 \cf2 \uc0\u55357 \u56446
\f1 This installer will guide you through the installation of a Scientific Python environment.\
\

\f2 \uc0\u9203
\f2 \uc0\u9203
\f1 Installation might take several minutes to complete, even if the installer says it's less than one minute. Please be patient!\
\

\f2 \uc0\u55356 \u57101
\f1 For more information on MNE-Python, please visit our website at {\field{\*\fldinst{HYPERLINK "https://mne.tools"}}{\fldrslt \cf3 \ul \ulc3 mne.tools}}.\cf3 \
\f2 \uc0\u55356 \u57101
\f1 For more information on Scientific Python, please visit our website at {\field{\*\fldinst{HYPERLINK "https://scientific-python.org"}}{\fldrslt \cf3 \ul \ulc3 scientific-python.org}}.\cf3 \
}
Binary file modified assets/welcome_macOS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading