-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add recipes for dmri-amico and dmri-dicelib #24708
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
399b887
Add recipes for dmri-dicelib and dmri-amico
pauldmccarthy b55b71d
FIx formatting, add license field
pauldmccarthy e4673b9
Remove pip check test, as it complains about cython
pauldmccarthy 1230382
There seems to be a compatibility issue with h5py and numpy; attempti…
pauldmccarthy ebb46c0
Remove support for cross-compilation to see if it resolves weird h5py…
pauldmccarthy b002457
Pin h5py to try and work around weird unrelated incompaitility
pauldmccarthy bbba4ec
Add Windows build file
pauldmccarthy 620d05b
Fix build files. Jeez, windows is so literal
pauldmccarthy dbc66ec
Allow blas/lapack libs to be specified separately
pauldmccarthy f4a4ddf
Add back in cross-compile capability
pauldmccarthy 57e6ce6
Don't use sha256 jinja var. Explanation for setup.py.patch
pauldmccarthy f773e50
Remove unused fn fields
pauldmccarthy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| echo [blas] >> site.cfg | ||
| echo library = blas >> site.cfg | ||
| echo library_dir = "%PREFIX%"\Library\lib >> site.cfg | ||
| echo include_dir = "%PREFIX%"\include >> site.cfg | ||
|
|
||
| echo [lapack] >> site.cfg | ||
| echo library = lapack >> site.cfg | ||
| echo library_dir = "%PREFIX%"\Library\lib >> site.cfg | ||
| echo include_dir = "%PREFIX%"\include >> site.cfg | ||
|
|
||
| "%PYTHON%" -m pip install --no-deps --ignore-installed . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| echo "[blas]" >> site.cfg | ||
| echo "library = blas" >> site.cfg | ||
| echo "library_dir = $PREFIX/lib" >> site.cfg | ||
| echo "include_dir = $PREFIX/include" >> site.cfg | ||
| echo "[lapack]" >> site.cfg | ||
| echo "library = lapack" >> site.cfg | ||
| echo "library_dir = $PREFIX/lib" >> site.cfg | ||
| echo "include_dir = $PREFIX/include" >> site.cfg | ||
|
|
||
| ${PYTHON} -m pip install . --no-deps -vv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| {% set name = "dmri-amico" %} | ||
| {% set version = "2.0.1" %} | ||
|
|
||
| package: | ||
| name: {{ name|lower }} | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
| url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz | ||
| sha256: 08fe9fe14554656fcfe9862dcdbb40f5cf9fc1cb9af5685435190110b83f1902 | ||
|
|
||
| # allow separate libraries for lapack / blas, rather than | ||
| # assuming a single library, i.e. openblas, for both. See | ||
| # https://github.com/daducci/AMICO/pull/179 | ||
| patches: | ||
| - setup.py.patch | ||
|
|
||
| build: | ||
| number: 0 | ||
|
|
||
| requirements: | ||
| build: | ||
| - {{ compiler('c') }} | ||
| - {{ compiler('cxx') }} | ||
| - cross-python_{{ target_platform }} # [build_platform != target_platform] | ||
| - python # [build_platform != target_platform] | ||
| - cython # [build_platform != target_platform] | ||
| host: | ||
| - cython | ||
| - libblas | ||
| - liblapack | ||
| - python | ||
| - pip | ||
| - spams-cython | ||
| run: | ||
| - dipy | ||
| - dmri-dicelib | ||
| - h5py >=3 | ||
| - python | ||
| - numpy | ||
| - scipy | ||
| - threadpoolctl | ||
|
|
||
| test: | ||
| imports: | ||
| - amico | ||
| commands: | ||
| - python -c "import amico; amico.setup()" | ||
|
|
||
| about: | ||
| home: https://pypi.org/project/dmri-amico/ | ||
| license: LicenseRef-DICE-lab | ||
| license_file: LICENSE | ||
| summary: Implementation of the linear framework for Accelerated Microstructure Imaging via Convex Optimization (AMICO) described in Daducci, Alessandro, et al. 2015 | ||
| dev_url: https://github.com/daducci/AMICO/ | ||
|
|
||
| extra: | ||
| recipe-maintainers: | ||
| - daducci | ||
| - nightwnvol | ||
| - pauldmccarthy | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| diff --git a/setup.py b/setup.py | ||
| index 1c5ed51b..43583678 100644 | ||
| --- a/setup.py | ||
| +++ b/setup.py | ||
| @@ -25,13 +25,15 @@ if not isfile('site.cfg'): | ||
| exit(1) | ||
| config = ConfigParser() | ||
| config.read('site.cfg') | ||
| -try: | ||
| - libraries.extend([config['openblas']['library']]) | ||
| - library_dirs.extend([config['openblas']['library_dir']]) | ||
| - include_dirs.extend([config['openblas']['include_dir']]) | ||
| -except KeyError as err: | ||
| - print(f'\033[31mKeyError: cannot find the {err} key in the site.cfg file. See the site.cfg.example file for documentation\033[0m') | ||
| - exit(1) | ||
| + | ||
| +for lib in ('blas', 'lapack', 'openblas'): | ||
| + if lib in config: | ||
| + libraries.extend([config[lib]['library']]) | ||
| + library_dirs.extend([config[lib]['library_dir']]) | ||
| + include_dirs.extend([config[lib]['include_dir']]) | ||
| +if len(libraries) == 0: | ||
| + print(f'\033[31mKeyError: cannot find LAPACK/BLAS/OpenBLAS paths in the site.cfg file. See the site.cfg.example file for documentation\033[0m') | ||
| + exit(1) | ||
|
|
||
| if sys.platform.startswith('win32'): | ||
| extra_compile_args.extend(['/std:c++14', '/fp:fast']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| {% set name = "dmri-dicelib" %} | ||
| {% set version = "1.0.3" %} | ||
|
|
||
| package: | ||
| name: {{ name|lower }} | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
| url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz | ||
| sha256: 5a2e315e2bebed0cbf19e300a2328827903d77086824ae8f04b0410f65585cc2 | ||
|
|
||
| build: | ||
| number: 0 | ||
| script: {{ PYTHON }} -m pip install . --no-deps -vv | ||
|
|
||
| requirements: | ||
| build: | ||
| - {{ compiler('c') }} | ||
| - {{ compiler('cxx') }} | ||
| - cross-python_{{ target_platform }} # [build_platform != target_platform] | ||
| - python # [build_platform != target_platform] | ||
| - cython # [build_platform != target_platform] | ||
| - numpy # [build_platform != target_platform] | ||
| host: | ||
| - cython | ||
| - numpy | ||
| - pip | ||
| - python | ||
| run: | ||
| - dipy | ||
| - h5py >=3 | ||
| - {{ pin_compatible('numpy') }} | ||
| - python | ||
| - scipy | ||
|
|
||
| test: | ||
| imports: | ||
| - dicelib | ||
|
|
||
| about: | ||
| home: https://pypi.org/project/dmri-dicelib/ | ||
| license: LicenseRef-DICE-lab | ||
| license_file: LICENSE | ||
| summary: Various algorithms developed by the DICE lab to process/manipulate diffusion MRI objects, e.g. streamlines, tractograms etc. | ||
| dev_url: https://pypi.org/project/dmri-dicelib/ | ||
|
|
||
| extra: | ||
| recipe-maintainers: | ||
| - daducci | ||
| - nightwnvol | ||
| - pauldmccarthy |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.