From b1a909e874026d70c1f21918e8e3b0a870d193b3 Mon Sep 17 00:00:00 2001 From: Iyad Ba Gari <39617810+bagari@users.noreply.github.com> Date: Sun, 3 Nov 2024 09:27:26 -0800 Subject: [PATCH] Update meta-neuro version 1.0.0 (#51826) * update meta.yaml file for meta package version 1.0.0 https://bioconda.github.io/recipes/meta/README.html#package-meta * Update meta.yaml * Fix boost version compatibility with ITK * update ITK version to 5.3.0 to prevent install libitk and version 5.4rc02 * update ITK run section at meta.yaml * Update meta.yaml * Add libgl-devel * Update meta.yaml * update build_variant * Include test data into meta folder Moving test data into the meta folder to solve the input data error does not exist during the container test. * adding test data * change and saved test data into $PREFIX/share/meta/example * add python support 3.8-3.11 Python 3.12 will be supported after ITK updates its release. * update meta.yaml with skipping python 3.12 * debug "No space left on device" issue * Drop support python 3.8 to solve storage issue, hopefully * Update build to rebuild and check storage issue. * Update meta.yaml * Build only for python 3.10 * incrementing the build number * Update meta.yaml * Update meta.yaml * Update build.sh * Update build.sh * Update meta.yaml * Delete conda_build_config.yaml * Update meta.yaml * support apple arm * trying support vtk with egl variant * Update meta.yaml * keep only support VTK with osmesa for linux * Update meta.yaml * last attempt to build all python variants, hope no space error * force to skip python 3.12 * Update conda_build_config.yaml * Update package name from meta to meta-neuro * update folder name as well * update name to meta-neuro --- recipes/{meta => meta-neuro}/build.sh | 17 ++++-- recipes/meta-neuro/conda_build_config.yaml | 18 +++++++ recipes/{meta => meta-neuro}/meta.yaml | 60 ++++++++++------------ 3 files changed, 57 insertions(+), 38 deletions(-) rename recipes/{meta => meta-neuro}/build.sh (71%) mode change 100755 => 100644 create mode 100644 recipes/meta-neuro/conda_build_config.yaml rename recipes/{meta => meta-neuro}/meta.yaml (54%) mode change 100755 => 100644 diff --git a/recipes/meta/build.sh b/recipes/meta-neuro/build.sh old mode 100755 new mode 100644 similarity index 71% rename from recipes/meta/build.sh rename to recipes/meta-neuro/build.sh index b7767bfc0161f..b30b786bedb79 --- a/recipes/meta/build.sh +++ b/recipes/meta-neuro/build.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -ex unset LD LINK ARCH export CMAKE_INSTALL_RPATH='$ORIGIN/../lib' @@ -8,8 +9,12 @@ mkdir -p "$PREFIX/bin" mkdir -p "$PREFIX/lib" mkdir -p "$PREFIX/share" mkdir -p $SRC_DIR/build -cd $SRC_DIR/build || exit 1 +## copy small test data: +mkdir -p $PREFIX/share/meta-neuro/example +cp $SRC_DIR/resources/test.nii.gz $PREFIX/share/meta-neuro/example/ + +cd $SRC_DIR/build cmake -S $SRC_DIR -B $SRC_DIR/build \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ @@ -19,10 +24,12 @@ cmake -S $SRC_DIR -B $SRC_DIR/build \ -DCMAKE_INSTALL_RPATH=$CMAKE_INSTALL_RPATH \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=$CMAKE_BUILD_WITH_INSTALL_RPATH -cmake --build . --config Release --parallel ${CPU_COUNT} --verbose || exit 1 -cmake --install . || exit 1 +cmake --build . --config Release --parallel ${CPU_COUNT} --verbose +cmake --install . + +# Clean up build directory rm -rf $SRC_DIR/build # Install MeTA package -cd ${SRC_DIR} || exit 1 -${PYTHON} -m pip install . --no-deps -vv || exit 1 +cd ${SRC_DIR} +${PYTHON} -m pip install . --no-deps -vv diff --git a/recipes/meta-neuro/conda_build_config.yaml b/recipes/meta-neuro/conda_build_config.yaml new file mode 100644 index 0000000000000..09a4e9197bc16 --- /dev/null +++ b/recipes/meta-neuro/conda_build_config.yaml @@ -0,0 +1,18 @@ +build_variant: + - "osmesa" # [linux] + - "qt" # [osx] + +python: + - 3.11.* *_cpython + - 3.10.* *_cpython + - 3.9.* *_cpython + +python_impl: + - cpython + - cpython + - cpython + +numpy: + - 1.23.* + - 1.22.* + - 1.22.* diff --git a/recipes/meta/meta.yaml b/recipes/meta-neuro/meta.yaml old mode 100755 new mode 100644 similarity index 54% rename from recipes/meta/meta.yaml rename to recipes/meta-neuro/meta.yaml index 331b63318f57e..dfcd922cb0f7c --- a/recipes/meta/meta.yaml +++ b/recipes/meta-neuro/meta.yaml @@ -1,7 +1,6 @@ -{% set name = "meta" %} +{% set name = "meta-neuro" %} {% set version = "1.0.0" %} -{% set sha256 = "a35dd5bc3ccffaaf83aa488233467ae85dc5374aea3068c34a6dc85ea29e27a9" %} -{% set build_variant = "osmesa" if linux else "qt" %} +{% set sha256 = "c67bcad0899fc3f9c890ee26e9c1c2ab1a892430ce00a9ac090e36697efc9434" %} package: name: {{ name|lower }} @@ -13,9 +12,9 @@ source: build: number: 0 - skip: true # [not py39] + skip: true # [win ] run_exports: - - {{ pin_subpackage('meta', max_pin="x") }} + - {{ pin_subpackage('meta-neuro', max_pin="x.x.x") }} requirements: build: @@ -24,45 +23,38 @@ requirements: - make # [not win] host: - - python >=3.9,<3.10 - - pip - - boost =1.82 - - itk =5.3.0 - - libitk =5.3.0 - - libitk-devel =5.3.0 + - vtk >=9.2.6,<9.3.0 build=*{{ build_variant }}* + - libitk-devel ==5.3.0 - hdf5 >=1.14.2,<1.14.3.0a0 - - vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}* - - libexpat >=2.5.0,<2.6.0 - - vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}* + - libboost-python-devel >=1.82.0,<1.83.0 + - python + - pip + - setuptools run: - - qhull - - boost =1.82 - - itk =5.3.0 - - libitk =5.3.0 - - libitk-devel =5.3.0 + - vtk >=9.2.6,<9.3.0 build=*{{ build_variant }}* + - libitk-devel ==5.3.0 - hdf5 >=1.14.2,<1.14.3.0a0 - - vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}* - - numpy >=1.21 - - nibabel - - pandas - - pyvista - - scipy + - libboost-python-devel >=1.82.0,<1.83.0 + - qhull + - python + - pip + - setuptools + - numpy - tqdm - - tslearn - dipy - - libexpat >=2.5.0,<2.6.0 - - vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}* + - scipy + - pandas + - nibabel + - tslearn + - pyvista test: - source_files: - - resources/CST_R.nii.gz imports: - meta commands: - - meta --help 2>&1 || exit 1 - - vtklevelset resources/CST_R.nii.gz CST_R.vtk 0.1 && test -f CST_R.vtk - - cmrep_vskel -c 3 -p 1.5 -g CST_R.vtk CST_R_skeleton.vtk && test -f CST_R_skeleton.vtk + - vtklevelset $PREFIX/share/meta-neuro/example/test.nii.gz test.vtk 0.1 + - cmrep_vskel -c 3 -p 1.5 -g test.vtk test_skeleton.vtk about: home: https://github.com/bagari/meta @@ -76,5 +68,7 @@ about: extra: bulk: true + additional-platforms: + - osx-arm64 recipe-maintainers: - bagari