r-nloptr: Explicit depends_on(nlopt). Previously there was a hidden d… (#9176)

* r-nloptr: Explicit depends_on(nlopt). Previously there was a hidden dependency, masked by the package's configure script.

* r-nloptr: Change spelling of variables to satisfy pyflake8

* r-nloptr: Break a long line to satisfy pyflake8

* r-nloptr: larger indent on continuation, to satisfy pyflake8

* r-nloptr: another attempt at larger indent on continuation, to satisfy pyflake8

* r-nloptr: now a smaller indent on continuation, to satisfy pyflake8

* r-nloptr: Another attempt at right amount of indent.

* r-nloptr: Another attempt at right amount of indent.

* Use the correct attributes for finding the nlopt includes and libs.

* Lines too long, split into pieces
This commit is contained in:
Neil Flood 2018-09-14 23:11:16 +10:00 committed by Adam J. Stewart
parent 98d8c4d7ca
commit 1122fc3d1e

View File

@ -42,3 +42,13 @@ class RNloptr(RPackage):
version('1.0.4', 'f2775dfb4f7f5552d46937a04c062b0d')
depends_on('r-testthat', type=('build', 'run'))
depends_on('nlopt')
def configure_args(self):
include_flags = self.spec['nlopt'].headers.include_flags
libs = self.spec['nlopt'].libs.libraries[0]
args = [
'--with-nlopt-cflags={0}'.format(include_flags),
'--with-nlopt-libs={0}'.format(libs)
]
return args