Skip to content

Commit

Permalink
Changed setup.py to not crash when fim.so download is unavailable for…
Browse files Browse the repository at this point in the history
… some reason (NeuralEnsemble#217)

* Changed install to not crash when fim download is unavailable.

* Removed unnecessary statement
  • Loading branch information
mdenker committed Apr 18, 2019
1 parent 839e25d commit b9680d9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@

if oext:
if is_python3:
if is_64bit:
urlretrieve('http://www.borgelt.net/bin64/py3/fim' + oext,
'elephant/spade_src/fim' + oext)
else:
urlretrieve('http://www.borgelt.net/bin32/py3/fim' + oext,
'elephant/spade_src/fim' + oext)
py_ver = '3'
else:
if is_64bit:
urlretrieve('http://www.borgelt.net/bin64/py2/fim' + oext,
'elephant/spade_src/fim' + oext)
else:
urlretrieve('http://www.borgelt.net/bin32/py2/fim' + oext,
'elephant/spade_src/fim' + oext)
py_ver = '2'
if is_64bit:
arch = '64'
else:
arch = '32'

try:
urlretrieve('http://www.borgelt.net/bin' +
arch + '/py' + py_ver + '/fim' + oext,
'elephant/spade_src/fim' + oext)
except:
print("Unable to download fim" + oext + " module.")

setup(
name="elephant",
Expand Down

0 comments on commit b9680d9

Please sign in to comment.