From c3ac86310e7d091e775ef3835b3f2fb3f7c26c02 Mon Sep 17 00:00:00 2001 From: serbanmaerean Date: Sat, 4 Mar 2017 08:53:50 -0500 Subject: [PATCH] ADIOS: change subclassing from Package to AutotoolsPackage (#3230) * ADIOS: change the invocation of python script that generates test files The python script ADIOS*/utils/gpp/gpp.py is invoked directly in the ADIOS*/tests/genarray/Makefile and the name of the python interpreter can be quite long if it is one built under spack, i.e. longer than the 80 characters allowed by the #! line in bash. The name of the shbang line is truncated at 80 characters and bash cannot find the python interpreter specified. This fix changes how the script is executed, by invoking it under python. This way, the shbang line is ignored. * adios: fixed flake8 errors from previous commit. * adio: Switch to AutotoolsPackage class from Package class Switched in order to add support for the ppc64le platform. --- .../repos/builtin/packages/adios/package.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py index 6066dd078ed..870e049fc91 100644 --- a/var/spack/repos/builtin/packages/adios/package.py +++ b/var/spack/repos/builtin/packages/adios/package.py @@ -26,7 +26,7 @@ from spack import * -class Adios(Package): +class Adios(AutotoolsPackage): """The Adaptable IO System (ADIOS) provides a simple, flexible way for scientists to describe the data in their code that may need to be written, @@ -77,6 +77,8 @@ class Adios(Package): # optional transports & file converters depends_on('hdf5@1.8:+mpi', when='+hdf5') + build_directory = 'spack-build' + # ADIOS uses the absolute Python path, which is too long and results in # "bad interpreter" errors patch('python.patch') @@ -95,9 +97,10 @@ def validate(self, spec): msg = 'cannot build a fortran variant without a fortran compiler' raise RuntimeError(msg) - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec self.validate(spec) - # Handle compilation after spec validation + extra_args = [] # required, otherwise building its python bindings on ADIOS will fail @@ -130,10 +133,4 @@ def install(self, spec, prefix): if '+hdf5' in spec: extra_args.append('--with-phdf5=%s' % spec['hdf5'].prefix) - sh = which('sh') - sh('./autogen.sh') - - configure("--prefix=%s" % prefix, - *extra_args) - make() - make("install") + return extra_args