diff --git a/.conda/post-link.sh b/.conda/post-link.sh new file mode 100755 index 0000000000000000000000000000000000000000..af4ace98972a59cca1f2a4c0d46ea10883e96d26 --- /dev/null +++ b/.conda/post-link.sh @@ -0,0 +1,8 @@ +if [ -z ${FSLDIR} ]; then exit; fi +if [ ! -d ${FSLDIR}/bin ]; then exit; fi +scripts="atlasquery atlasq imcp immv imglob" +for script in $scripts; do + if [ -f ${FSLDIR}/bin/${script} ]; then rm ${FSLDIR}/bin/${script}; fi + ln -s ${PREFIX}/bin/${script} ${FSLDIR}/bin/${script} +done + diff --git a/.conda/pre-unlink.sh b/.conda/pre-unlink.sh new file mode 100755 index 0000000000000000000000000000000000000000..fa79dac5240a78d3184c3873bab50bf2957487ba --- /dev/null +++ b/.conda/pre-unlink.sh @@ -0,0 +1,5 @@ +if [ -z ${FSLDIR} ]; then exit; fi +scripts="atlasquery atlasq imcp immv imglob" +for script in $scripts; do + if [ -f ${FSLDIR}/bin/${script} ]; then rm ${FSLDIR}/bin/${script}; fi +done diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05efa7d676376d8b70f107e1c21b1b171f075f52..8d7b79e9f4529258aa25d5bfc75ac827133ff995 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,15 @@ This document contains the ``fslpy`` release history in reverse chronological order. +1.6.2 (Tuesday January 30th 2018) +--------------------------------- + + +* Updates to the ``conda`` installation process. +* A new script is installed when ``fslpy`` is installed via ``pip`` or + ``conda`` - ``atlasquery``, which emulates the FSL ``atlasquery`` tool. + + 1.6.1 (Monday January 29th 2018) -------------------------------- diff --git a/fsl/scripts/atlasq.py b/fsl/scripts/atlasq.py index 486e2c02a719cb93cfe5729285d24e743565a190..e1aae0eccefbd6484758f7fa239e6fbf665f4b9b 100644 --- a/fsl/scripts/atlasq.py +++ b/fsl/scripts/atlasq.py @@ -738,5 +738,16 @@ def main(args=None): return 0 +def atlasquery_emulation(args=None): + """Entry point for ``atlasquery``. Runs as ``atlasq`` in ``ohi`` + mode. + """ + + if args is None: + args = sys.argv[1:] + + return main(['ohi'] + args) + + if __name__ == '__main__': sys.exit(main()) diff --git a/fsl/version.py b/fsl/version.py index f0092c4b6c9611225c40958f87c964d9c4b87854..58f7f0daf716c423a8bb1cb47504803932bfe48b 100644 --- a/fsl/version.py +++ b/fsl/version.py @@ -41,7 +41,7 @@ import re import string -__version__ = '1.6.1' +__version__ = '1.6.2' """Current version number, as a string. """ diff --git a/setup.py b/setup.py index e9fa4e65851f5a7a4b43fe3aa1559ee9534c846c..228878ef4cdb47ddfd6791924fb0e6aaf56815fd 100644 --- a/setup.py +++ b/setup.py @@ -124,10 +124,11 @@ setup( entry_points={ 'console_scripts' : [ - 'immv = fsl.scripts.immv:main', - 'imcp = fsl.scripts.imcp:main', - 'imglob = fsl.scripts.imglob:main', - 'atlasq = fsl.scripts.atlasq:main', + 'immv = fsl.scripts.immv:main', + 'imcp = fsl.scripts.imcp:main', + 'imglob = fsl.scripts.imglob:main', + 'atlasq = fsl.scripts.atlasq:main', + 'atlasquery = fsl.scripts.atlasq:atlasquery_emulation', ] } )