From 6b7031a132473bd683dc3c095858a81110cd7db9 Mon Sep 17 00:00:00 2001 From: Iyad Ba Gari Date: Fri, 11 Oct 2024 20:33:59 -0700 Subject: [PATCH 1/4] add build.sh, meta.yaml and conda_build_config.yaml --- recipes/meta/build.sh | 28 ++++++++ recipes/meta/conda_build_config.yaml | 9 +++ recipes/meta/meta.yaml | 96 ++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100755 recipes/meta/build.sh create mode 100755 recipes/meta/conda_build_config.yaml create mode 100755 recipes/meta/meta.yaml diff --git a/recipes/meta/build.sh b/recipes/meta/build.sh new file mode 100755 index 0000000000000..0bbfc2bf9a524 --- /dev/null +++ b/recipes/meta/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +unset LD LINK ARCH +export CMAKE_INSTALL_RPATH='$ORIGIN/../lib' +export CMAKE_BUILD_WITH_INSTALL_RPATH=ON + +mkdir -p "$PREFIX/bin" +mkdir -p "$PREFIX/lib" +mkdir -p "$PREFIX/share" +mkdir -p $SRC_DIR/build +cd $SRC_DIR/build + +cmake -S $SRC_DIR -B $SRC_DIR/build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_MODULE_PATH=$PREFIX/share/cmake \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_RPATH=$CMAKE_INSTALL_RPATH \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=$CMAKE_BUILD_WITH_INSTALL_RPATH + +cmake --build . --config Release +cmake --install . +rm -rf $SRC_DIR/build + +# Install MeTA package +cd ${SRC_DIR} +${PYTHON} -m pip install . --no-deps -vv diff --git a/recipes/meta/conda_build_config.yaml b/recipes/meta/conda_build_config.yaml new file mode 100755 index 0000000000000..3d12527886f1a --- /dev/null +++ b/recipes/meta/conda_build_config.yaml @@ -0,0 +1,9 @@ +build_variant: + - "osmesa" # [linux] + - "qt" # [osx] + +python: + - 3.8 + - 3.9 + - 3.10 + - 3.11 \ No newline at end of file diff --git a/recipes/meta/meta.yaml b/recipes/meta/meta.yaml new file mode 100755 index 0000000000000..3919f168593b3 --- /dev/null +++ b/recipes/meta/meta.yaml @@ -0,0 +1,96 @@ +{% set name = "meta-neuro" %} +{% set version = "1.0.0" %} +{% set sha256 = "96673754c8f8c926bd179a824513de36d0b361eb93b1f7781cbac27ecf520d6e" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/bagari/meta/archive/refs/tags/v{{ version }}.tar.gz + sha256: {{ sha256 }} + +build: + number: 0 + skip: true # [win] + +requirements: + build: + - {{ compiler('cxx') }} + - {{ stdlib("c") }} + - cmake + - make # [not win] + - python {{ python }} + - pip + - git + - setuptools + - boost =1.82 + - itk ==5.3.0 + - libitk ==5.3.0 + - 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.6 + - libexpat >=2.5.0,<3.0a0 + - vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}* + + host: + - qhull + - boost =1.82 + - itk ==5.3.0 + - libitk ==5.3.0 + - libitk-devel ==5.3.0 + - hdf5 >=1.14.2,<1.14.3.0a0 + - vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}* + - python {{ python }} + - libexpat <2.6 + - libexpat >=2.5.0,<3.0a0 + - vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}* + + run: + - qhull + - boost =1.82 + - itk ==5.3.0 + - libitk ==5.3.0 + - libitk-devel ==5.3.0 + - hdf5 >=1.14.2,<1.14.3.0a0 + - vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}* + - python {{ python }} + - numpy + - setuptools + - nibabel + - pandas + - pyvista + - scipy + - tqdm + - tslearn + - dipy + - libexpat <2.6 + - libexpat >=2.5.0,<3.0a0 + - vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}* + +test: + imports: + - meta + commands: + - set -x + - meta --help + - cmrep_vskel -h || true + - vtklevelset -h || true + +about: + home: https://github.com/bagari/meta + license: BSD-3-Clause + license_file: LICENSE.txt + summary: 'Medial Tractography Analysis (MeTA)' + description: | + MeTA is a workflow implemented to minimize microstructural heterogeneity + in diffusion MRI (dMRI) metrics by extracting and parcellating the core + volume along the bundle length in the voxel-space directly while effectively + preserving bundle shape and efficiently capturing the regional variation + within and along white matter (WM) bundles. + dev_url: https://github.com/bagari/meta + +extra: + recipe-maintainers: + - bagari From 79b47b0e9d193c755714a72cf08e660da4487d79 Mon Sep 17 00:00:00 2001 From: Iyad Ba Gari <39617810+bagari@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:44:26 -0700 Subject: [PATCH 2/4] Update build.sh --- recipes/meta/build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/meta/build.sh b/recipes/meta/build.sh index 0bbfc2bf9a524..8740ec67e3151 100755 --- a/recipes/meta/build.sh +++ b/recipes/meta/build.sh @@ -8,7 +8,7 @@ mkdir -p "$PREFIX/bin" mkdir -p "$PREFIX/lib" mkdir -p "$PREFIX/share" mkdir -p $SRC_DIR/build -cd $SRC_DIR/build +cd $SRC_DIR/build || exit 1 cmake -S $SRC_DIR -B $SRC_DIR/build \ -DCMAKE_BUILD_TYPE=Release \ @@ -19,10 +19,10 @@ 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 -cmake --install . +cmake --build . --config Release || exit 1 +cmake --install . || exit 1 rm -rf $SRC_DIR/build # Install MeTA package -cd ${SRC_DIR} -${PYTHON} -m pip install . --no-deps -vv +cd ${SRC_DIR} || exit 1 +${PYTHON} -m pip install . --no-deps -vv || exit 1 From ec43e5c14214f9fbd9beeb1119208fb2cf2cc614 Mon Sep 17 00:00:00 2001 From: Iyad Ba Gari <39617810+bagari@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:44:50 -0700 Subject: [PATCH 3/4] Update conda_build_config.yaml --- recipes/meta/conda_build_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/meta/conda_build_config.yaml b/recipes/meta/conda_build_config.yaml index 3d12527886f1a..70f2566e9b624 100755 --- a/recipes/meta/conda_build_config.yaml +++ b/recipes/meta/conda_build_config.yaml @@ -6,4 +6,4 @@ python: - 3.8 - 3.9 - 3.10 - - 3.11 \ No newline at end of file + - 3.11 From a3efe60534e3f8156af3539b07919c5e3a943d2f Mon Sep 17 00:00:00 2001 From: Iyad Ba Gari <39617810+bagari@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:45:13 -0700 Subject: [PATCH 4/4] Update meta.yaml --- recipes/meta/meta.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/recipes/meta/meta.yaml b/recipes/meta/meta.yaml index 3919f168593b3..d9526607ce4ee 100755 --- a/recipes/meta/meta.yaml +++ b/recipes/meta/meta.yaml @@ -1,4 +1,4 @@ -{% set name = "meta-neuro" %} +{% set name = "meta" %} {% set version = "1.0.0" %} {% set sha256 = "96673754c8f8c926bd179a824513de36d0b361eb93b1f7781cbac27ecf520d6e" %} @@ -12,7 +12,7 @@ source: build: number: 0 - skip: true # [win] + skip: true # [win] # Windows support will be added in next release. requirements: build: @@ -73,10 +73,9 @@ test: imports: - meta commands: - - set -x - meta --help - - cmrep_vskel -h || true - - vtklevelset -h || true + - cmrep_vskel --version + - vtklevelset --version about: home: https://github.com/bagari/meta @@ -84,12 +83,9 @@ about: license_file: LICENSE.txt summary: 'Medial Tractography Analysis (MeTA)' description: | - MeTA is a workflow implemented to minimize microstructural heterogeneity - in diffusion MRI (dMRI) metrics by extracting and parcellating the core - volume along the bundle length in the voxel-space directly while effectively - preserving bundle shape and efficiently capturing the regional variation - within and along white matter (WM) bundles. + MeTA is a workflow implemented to minimize microstructural heterogeneity in diffusion MRI (dMRI) metrics by extracting and parcellating the core volume along the bundle length in the voxel-space directly while effectively preserving bundle shape and efficiently capturing the regional variation within and along white matter (WM) bundles. dev_url: https://github.com/bagari/meta + doc_url: https://github.com/bagari/meta/wiki extra: recipe-maintainers: