Skip to content
Snippets Groups Projects
Commit 23cf1c18 authored by Kenny Sharma's avatar Kenny Sharma
Browse files

[NRRPLT-5460] Only compile numpy once if needed.

After the removal of the additional hbp-nrp dependencies to
support Bitbucket installation, our Jenkins builds now (again)
build one version of numpy with scipy and one separately as
specified by the CLE. This patch migrates the early installation of
numpy from the CLE to mitigate this.

All packages were updated to future proof dependencies, failure is
ignored and normal installation will proceed if there is no numpy
requirement specified.

Minor pylint cleanup also performed in the setup.py files.

Change-Id: I6b055439c80d931845937939261eb4b6b649c50a
parent 3ec8001a
No related branches found
No related tags found
No related merge requests found
'''setup.py''' '''setup.py'''
# pylint: disable=F0401,E0611,W0142 from setuptools import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import hbp_nrp_music_interface import hbp_nrp_music_interface
import pip import pip
...@@ -30,6 +25,16 @@ else: ...@@ -30,6 +25,16 @@ else:
) )
reqs = [str(ir.req) for ir in install_reqs] 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 = { config = {
'description': 'MUSIC interface support for CLE/ExDBackend for HBP SP10', 'description': 'MUSIC interface support for CLE/ExDBackend for HBP SP10',
'author': 'HBP Neurorobotics', 'author': 'HBP Neurorobotics',
......
'''setup.py''' '''setup.py'''
# pylint: disable=F0401,E0611,W0142 from setuptools import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import hbp_nrp_music_xml import hbp_nrp_music_xml
import pip import pip
...@@ -30,6 +25,16 @@ else: ...@@ -30,6 +25,16 @@ else:
) )
reqs = [str(ir.req) for ir in install_reqs] 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 = { config = {
'description': 'MUSIC XML support for pyNN/NEST for HBP SP10', 'description': 'MUSIC XML support for pyNN/NEST for HBP SP10',
'author': 'HBP Neurorobotics', 'author': 'HBP Neurorobotics',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment