Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Use bundle_tools_3 and fix various bugs #195

Merged
merged 64 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
48ae61d
MAINT: Use bundle_tools_3
larsoner Jul 13, 2023
2930c71
FIX: No patch
larsoner Jul 13, 2023
0678ef9
WIP: Maybe?
larsoner Jul 13, 2023
38f5148
FIX: Wordpad
larsoner Jul 13, 2023
f378242
FIX: Again
larsoner Jul 13, 2023
7ad989e
Revert "FIX: Again"
larsoner Jul 13, 2023
b74eeee
FIX: NOT WIN
larsoner Jul 13, 2023
4938ecd
MAINT: Rerun and cruft
larsoner Jul 17, 2023
b959606
FIX: No patch
larsoner Jul 17, 2023
ca3fa25
FIX: Defaults
larsoner Jul 17, 2023
1afb4b3
FIX: SPacing
larsoner Jul 17, 2023
9fd2a61
FIX: Suggestion
larsoner Jul 17, 2023
0ab84f2
ENH: Notifications
larsoner Jul 17, 2023
ba344c9
FIX: Comment
larsoner Jul 17, 2023
b460387
FIX: Ver
larsoner Jul 17, 2023
a61e02d
FIX: Trim
larsoner Jul 17, 2023
158b171
FIX: Paths
larsoner Jul 17, 2023
00b07f0
FIX: Try again
larsoner Jul 18, 2023
60670a0
FIX: Tests
larsoner Jul 18, 2023
3a38d3f
FIX: Test
larsoner Jul 18, 2023
0b2c08f
FIX: Test
larsoner Jul 18, 2023
347d993
Merge branch 'main' into bt3
hoechenberger Jul 26, 2023
145c280
Merge remote-tracking branch 'upstream/main' into bt3
larsoner Aug 30, 2023
8b49f0c
FIX: Update
larsoner Aug 30, 2023
b78744f
FIX: Try here
larsoner Aug 30, 2023
8ecfc03
FIX: Install it
larsoner Aug 30, 2023
a86e052
FIX: Pin
larsoner Aug 30, 2023
5d7b1ea
WIP: Restore emoji
larsoner Aug 31, 2023
958f4c1
FIX: Spyder
larsoner Aug 31, 2023
844551f
WIP: Simplify macOS
larsoner Aug 31, 2023
f0a96e3
FIX: Back to library
larsoner Aug 31, 2023
fe8406f
FIX: Fixes for macOS
larsoner Aug 31, 2023
fe9e273
FIX: Path
larsoner Aug 31, 2023
d5927c3
FIX: Path
larsoner Aug 31, 2023
23a5813
FIX: More specific
larsoner Aug 31, 2023
7ce3af3
FIX: No longer needed
larsoner Aug 31, 2023
91c4567
FIX: CI
larsoner Aug 31, 2023
0bb99ec
FIX: Revert
larsoner Aug 31, 2023
85ae490
FIX: Revert
larsoner Aug 31, 2023
cbb43b6
FIX: Action
larsoner Aug 31, 2023
3bf2cea
FIX: environment.yml
larsoner Aug 31, 2023
f382e78
TST: Ping
larsoner Aug 31, 2023
6707055
FIX: Simplify
larsoner Aug 31, 2023
05474c7
FIX: Simplify more
larsoner Aug 31, 2023
1a51a10
FIX: Unify
larsoner Aug 31, 2023
356cc95
Update build.yml
larsoner Sep 1, 2023
f4a7d9e
Update post_install_windows.bat
larsoner Sep 1, 2023
4c5cce2
Update post_install_windows.bat
larsoner Sep 1, 2023
955fb7f
FIX: libmamba
larsoner Sep 1, 2023
67867d9
FIX: Workaround
larsoner Sep 1, 2023
c49ac77
FIX: Maybe
larsoner Sep 1, 2023
7019c7b
FIX: Maybe
larsoner Sep 1, 2023
e35f34b
FIX: Fixes
larsoner Sep 1, 2023
49223a5
FIX: Facilitate editable install
larsoner Sep 1, 2023
e595c16
FIX: Msg
larsoner Sep 1, 2023
483788a
FIX: Remove timeout
larsoner Sep 1, 2023
c5dfc2a
ENH: Menus here
larsoner Sep 1, 2023
ea00c68
Revert "ENH: Menus here"
larsoner Sep 1, 2023
961f550
Update assets/post_install_macOS.sh [ci skip]
larsoner Sep 1, 2023
b847b41
Merge branch 'main' into bt3
larsoner Sep 2, 2023
7f10d03
FIX: Nest
larsoner Sep 2, 2023
d9d2415
FIX: Whoops
larsoner Sep 2, 2023
ee224f6
ENH: Add development tools
larsoner Sep 5, 2023
5585a04
FIX: Versions
larsoner Sep 6, 2023
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
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ jobs:
echo "MNE_INSTALLER_VERSION=${MNE_INSTALLER_VERSION}"
echo "MNE_ACTIVATE=${MNE_ACTIVATE}" >> $GITHUB_ENV
echo "MNE_ACTIVATE=${MNE_ACTIVATE}"
echo "MNE_INSTALL_PREFIX=$MNE_INSTALL_PREFIX" >> $GITHUB_ENV
echo "NSIS_SCRIPTS_RAISE_ERRORS=1" >> $GITHUB_ENV

- name: Download appropriate installer
Expand Down Expand Up @@ -405,6 +406,10 @@ jobs:
for f in mne-python*.desktop; do echo "📂 $f:"; cat "$f"; echo; done
popd
fi
echo "Checking for pinned file..."
test -e "$MNE_INSTALL_PREFIX/conda-meta/pinned"
grep "openblas" "$MNE_INSTALL_PREFIX/conda-meta/pinned"

echo "Checking permissions..."
OWNER=`ls -ld "$(which python)" | awk '{print $3}'`
echo "Got OWNER=$OWNER, should be $(whoami)"
Expand Down
2 changes: 1 addition & 1 deletion assets/post_install_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ${PREFIX}/bin/conda env config vars set MAMBA_NO_BANNER=1
echo "ℹ️ Setting libmama as the conda solver."
${PREFIX}/bin/conda config --set solver libmamba

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

echo "ℹ️ Running mne sys_info."
Expand Down
24 changes: 12 additions & 12 deletions assets/post_install_macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ fi
MNE_APP_DIR="$APP_DIR/MNE-Python $MNE_VERSION"
logger -p 'install.info' "📓 MNE_APP_DIR=$MNE_APP_DIR"

logger -p 'install.info' "ℹ️ Moving root MNE .app bundles from $APP_DIR to $MNE_APP_DIR"
logger -p 'install.info' "ℹ️ Moving root MNE .app bundles from $APP_DIR to $MNE_APP_DIR."
$PERMS mkdir -p "$MNE_APP_DIR"
$PERMS mv "$APP_DIR"/*\(MNE\).app "$MNE_APP_DIR"/

logger -p 'install.info' "ℹ️ Fixing permissions of MNE .app bundles in $MNE_APP_DIR: new owner will be ${USER_FROM_HOMEDIR}"
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"

MNE_ICON_PATH="$PREFIX/Menu/mne.png"
logger -p 'install.info' "ℹ️ Setting custom folder icon for $MNE_APP_DIR to $MNE_ICON_PATH"
logger -p 'install.info' "ℹ️ Setting custom folder icon for $MNE_APP_DIR to $MNE_ICON_PATH."
osascript \
-e 'set destPath to "'"${MNE_APP_DIR}"'"' \
-e 'set iconPath to "'"${MNE_ICON_PATH}"'"' \
Expand All @@ -59,26 +59,26 @@ if [ "${PYTHON_PLATFORM}" == "x86_64" ]; then
${PREFIX}/bin/conda env config vars set CONDA_SUBDIR=osx-64
fi

logger -p 'install.info' "ℹ️ Configuring Python to ignore user-installed local packages"
logger -p 'install.info' "ℹ️ Configuring Python to ignore user-installed local packages."
${DSTBIN}/conda env config vars set PYTHONNOUSERSITE=1

logger -p 'install.info' "ℹ️ Disabling mamba package manager banner"
logger -p 'install.info' "ℹ️ Disabling mamba package manager banner."
${DSTBIN}/conda env config vars set MAMBA_NO_BANNER=1

logger -p 'install.info' "ℹ️ Setting libmama as the conda solver."
logger -p 'install.info' "ℹ️ Setting libmama as the conda solve.r"
larsoner marked this conversation as resolved.
Show resolved Hide resolved
${DSTBIN}/conda config --set solver libmamba

logger -p 'install.info' "ℹ️ Configuring Matplotlib to use the Qt backend by default"
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"
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}"
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"
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}"
logger -p 'install.info' "ℹ️ Opening in Finder ${MNE_APP_DIR}/."
open -R "${MNE_APP_DIR}/"
28 changes: 16 additions & 12 deletions assets/post_install_windows.bat
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
echo ℹSetting permissions on the Python installation to %USERNAME%.
takeown /u %USERNAME% /f %PREFIX% /r /d y
@ECHO OFF

echo ℹConfiguring Python to ignore user-installed local packages.
"%PREFIX%\bin\conda" env config vars set PYTHONNOUSERSITE=1
echo Setting read/write permissions on the Python installation to %USERNAME%.
icacls %PREFIX% /grant %USERNAME%:(OI)(CI)M /c /t /q

echo ℹDisabling mamba package manager banner.
"%PREFIX%\bin\conda" env config vars set MAMBA_NO_BANNER=1
echo Configuring Python to ignore user-installed local packages.
"%PREFIX%\Scripts\conda" env config vars set PYTHONNOUSERSITE=1

echo ℹSetting libmama as the conda solver.
"%PREFIX%\bin\conda" config --set solver libmamba
echo Disabling mamba package manager banner.
"%PREFIX%\Scripts\conda" env config vars set MAMBA_NO_BANNER=1

echo ℹPinning BLAS implementation to OpenBLAS
echo "libblas=*=*openblas" >> "%PREFIX%\bin\conda\conda-meta\pinned"
echo Setting libmama as the conda solver.
"%PREFIX%\Scripts\conda" config --set solver libmamba

echo ℹRunning mne sys_info.
"%PREFIX%\bin\conda" run mne sys_info
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

timeout /t 5
2 changes: 1 addition & 1 deletion recipes/mne-python_1.5/construct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ specs:
- pingouin =0.5.3
- pycircstat =0.0.2
# MRI
- fsleyes =1.8.2
- fsleyes =1.8.3
- dcm2niix =1.0.20230411
# Time-frequency analysis
- pactools =0.3.1
Expand Down
1 change: 1 addition & 0 deletions tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def check_min_version(package, min_version):
if platform.system() != "Windows":
import mne_icalabel
import autoreject
import pyriemann
import pyprep
import pycrostates
import darkdetect
Expand Down
4 changes: 1 addition & 3 deletions tests/test_outdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ class Package: # noqa: D101
version_conda_forge: str | None = None


allowed_outdated: set[str] = {
"fsleyes", # some unknown bug where 1.8.3 can't be downloaded on 2023/09/01
}
allowed_outdated: set[str] = set()
packages: list[Package] = []

for spec in specs:
Expand Down
10 changes: 7 additions & 3 deletions tools/extract_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,20 @@ elif [[ "$MACHINE" == "macOS" && "$PYMACHINE" == "arm64" ]]; then
fi

if [[ "$MACHINE" == "macOS" ]]; then
MNE_INSTALL_PREFIX="/Library/mne-python_${MNE_INSTALLER_VERSION}"
MNE_INSTALLER_NAME="MNE-Python-${MNE_INSTALLER_VERSION}-${MACHINE}_${MACOS_SUFFIX}.pkg"
MNE_ACTIVATE="/Library/mne-python_${MNE_INSTALLER_VERSION}/bin/activate"
MNE_ACTIVATE="$MNE_INSTALL_PREFIX/bin/activate"
elif [[ "$MACHINE" == "Linux" ]]; then
MNE_INSTALL_PREFIX="$HOME/mne-python/${MNE_INSTALLER_VERSION}"
MNE_INSTALLER_NAME="MNE-Python-${MNE_INSTALLER_VERSION}-${MACHINE}.sh"
MNE_ACTIVATE="$HOME/mne-python/${MNE_INSTALLER_VERSION}/bin/activate"
MNE_ACTIVATE="$MNE_INSTALL_PREFIX/bin/activate"
else
MNE_INSTALL_PREFIX="$HOME/mne-python/$MNE_INSTALLER_VERSION"
MNE_INSTALLER_NAME="MNE-Python-${MNE_INSTALLER_VERSION}-${MACHINE}.exe"
MNE_ACTIVATE="$HOME/mne-python/$MNE_INSTALLER_VERSION/Scripts/activate"
MNE_ACTIVATE="$MNE_INSTALL_PREFIX/Scripts/activate"
fi

export MNE_INSTALL_PREFIX="$MNE_INSTALL_PREFIX"
export MNE_INSTALLER_NAME="${MNE_INSTALLER_NAME}"
export MNE_ACTIVATE="$MNE_ACTIVATE"
export MNE_INSTALLER_ARTIFACT_ID="MNE-Python-${MACHINE}-${ARTIFACT_ID_SUFFIX}"