diff --git a/hbp_nrp_music_interface/setup.py b/hbp_nrp_music_interface/setup.py index 863ccb582a8f59bb4c4c480007304a65e0b084bb..a06b1e9f1c6910d39a9529cd2f41b1d98c1d1a75 100644 --- a/hbp_nrp_music_interface/setup.py +++ b/hbp_nrp_music_interface/setup.py @@ -1,11 +1,6 @@ '''setup.py''' -# pylint: disable=F0401,E0611,W0142 - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup import hbp_nrp_music_interface import pip @@ -30,6 +25,16 @@ else: ) reqs = [str(ir.req) for ir in install_reqs] +# ensure we install numpy before the main list of requirements, ignore +# failures if numpy/cython are not requirements and just proceed (future proof) +try: + cython_req = next(r for r in reqs if r.startswith('cython')) + numpy_req = next(r for r in reqs if r.startswith('numpy')) + pip.main(['install', '--no-clean', cython_req, numpy_req]) +# pylint: disable=bare-except +except: + pass + config = { 'description': 'MUSIC interface support for CLE/ExDBackend for HBP SP10', 'author': 'HBP Neurorobotics', diff --git a/hbp_nrp_music_xml/setup.py b/hbp_nrp_music_xml/setup.py index a003be0a6c71b8cefe6c5d5aa8d630963edc2431..fe404518242f997cdc6662cd9890f51bead24530 100644 --- a/hbp_nrp_music_xml/setup.py +++ b/hbp_nrp_music_xml/setup.py @@ -1,11 +1,6 @@ '''setup.py''' -# pylint: disable=F0401,E0611,W0142 - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup import hbp_nrp_music_xml import pip @@ -30,6 +25,16 @@ else: ) reqs = [str(ir.req) for ir in install_reqs] +# ensure we install numpy before the main list of requirements, ignore +# failures if numpy/cython are not requirements and just proceed (future proof) +try: + cython_req = next(r for r in reqs if r.startswith('cython')) + numpy_req = next(r for r in reqs if r.startswith('numpy')) + pip.main(['install', '--no-clean', cython_req, numpy_req]) +# pylint: disable=bare-except +except: + pass + config = { 'description': 'MUSIC XML support for pyNN/NEST for HBP SP10', 'author': 'HBP Neurorobotics',