Skip to content

Commit

Permalink
bump version, merge pull request #12 from AMYPAD/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Feb 1, 2021
2 parents b027a18 + b3340aa commit 7bafce0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ zip_safe = False
setup_requires=setuptools>=42; wheel; setuptools_scm[toml]>=3.4
install_requires=
argopt
miutil[nii]>=0.1.0,!=0.4.0,!=0.4.1
miutil[nii,web]>=0.7.2
setuptools # pkg_resources
brainweb>=1.6.2
numpy
scipy
include_package_data=True
Expand All @@ -53,7 +52,6 @@ dev=
pre-commit
twine
wheel
miutil[web]>=0.7.0
pytest
pytest-cov
pytest-timeout
Expand Down
16 changes: 5 additions & 11 deletions spm12/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
from os import path
from textwrap import dedent

from miutil.fdio import extractall
from miutil.mlab import get_engine
from miutil.web import urlopen_cached
from pkg_resources import resource_filename

try:
Expand Down Expand Up @@ -37,21 +39,13 @@ def ensure_spm(name=None, cache="~/.spm12", version=12):
if not eng.exist("spm_jobman"):
log.warning("MATLAB could not find SPM.")
try:
from zipfile import ZipFile

from brainweb import get_file

log.info("Downloading to %s", cache)
fname = get_file(
"spm12.zip",
with urlopen_cached(
"https://www.fil.ion.ucl.ac.uk/"
"spm/download/restricted/eldorado/spm12.zip",
cache,
chunk_size=2 ** 17,
)
log.info("Extracting")
with ZipFile(fname) as fd:
fd.extractall(path=cache)
) as fd:
extractall(fd, cache)
eng.addpath(addpath)
if not eng.exist("spm_jobman"):
raise RuntimeError("MATLAB could not find SPM.")
Expand Down

0 comments on commit 7bafce0

Please sign in to comment.