From b29d85663c19c574a4fd586e7b8367d54dccccc9 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 17:35:01 +0200 Subject: [PATCH 1/2] don't use --upx in mac build and guard if upx is not available --- tools/build/install_fs_pruned.sh | 18 +++++++++++++----- tools/macos_build/build_release_package.sh | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tools/build/install_fs_pruned.sh b/tools/build/install_fs_pruned.sh index 932a154f9..54a613ef9 100755 --- a/tools/build/install_fs_pruned.sh +++ b/tools/build/install_fs_pruned.sh @@ -427,12 +427,20 @@ do cp -r "$fss/$file" "$fsd/$file" done -# pack if desired with upx (do this before adding all the links +# pack if desired with upx (do this before adding all the links) if [[ "$upx" == "true" ]] ; then - echo "finding executables in $fsd/bin/..." - exe=($(find "$fsd/bin" -exec file {} \; | grep ELF | cut -d: -f1)) - echo "packing $fsd/bin/ executables (this can take a while) ..." - upx -9 "${exe[@]}" + if [[ -z "$(command -v upx)" ]] ; then + echo "UPX requested, but the 'upx' command was not found on PATH; skipping executable packing." + else + echo "finding executables in $fsd/bin/..." + exe=($(find "$fsd/bin" -exec file {} \; | grep ELF | cut -d: -f1)) + if [[ "${#exe[@]}" -eq 0 ]] ; then + echo "No UPX-packable executables found in $fsd/bin, skipping." + else + echo "packing $fsd/bin/ executables (this can take a while) ..." + upx -9 "${exe[@]}" + fi + fi fi # Modify fsbindings Python package to allow calling scripts like asegstats2table directly: diff --git a/tools/macos_build/build_release_package.sh b/tools/macos_build/build_release_package.sh index a6b305908..400c7ab1d 100755 --- a/tools/macos_build/build_release_package.sh +++ b/tools/macos_build/build_release_package.sh @@ -51,7 +51,7 @@ rsync -av --progress "$FASTSURFER_HOME/" "$FASTSURFER_TO_PACKAGE" \ --exclude .git # install freesurfer into temp folder -"$tools_dir/build/install_fs_pruned.sh" "$STAGED_DIR" --upx --url "$URL_TO_FREESURFER" +"$tools_dir/build/install_fs_pruned.sh" "$STAGED_DIR" --url "$URL_TO_FREESURFER" if [[ ! -d "$STAGED_DIR/freesurfer" ]] then From 2e95f3a176b4ee965e06b430398ebb92cb86d307 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Thu, 21 May 2026 17:36:01 +0200 Subject: [PATCH 2/2] switch version to new minor dev --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c92540c28..4a2b80632 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'fastsurfer' -version = '2.5.1' +version = '2.6.0-dev' description = 'A fast and accurate deep-learning based neuroimaging pipeline' readme = 'README.md' license = {file = 'LICENSE'}