def install(self, spec, prefix): with working_dir("src"): configure_args = ["--prefix=%s" % prefix] # PAPI uses MPI if MPI is present; since we don't require # an MPI package, we ensure that all attempts to use MPI # fail, so that PAPI does not get confused configure_args.append('MPICC=:') configure(*configure_args) # Don't use <malloc.h> for level in [".", "*", "*/*"]: files = glob.iglob(join_path(level, "*.[ch]")) filter_file(r"\<malloc\.h\>", "<stdlib.h>", *files) make() make("install") # The shared library is not installed correctly on Darwin if sys.platform == 'darwin': os.rename(join_path(prefix.lib, 'libpapi.so'), join_path(prefix.lib, 'libpapi.dylib')) fix_darwin_install_name(prefix.lib)
def install(self, spec, prefix): with working_dir("src"): configure_args = ["--prefix=%s" % prefix] # PAPI uses MPI if MPI is present; since we don't require # an MPI package, we ensure that all attempts to use MPI # fail, so that PAPI does not get confused configure_args.append('MPICC=:') configure(*configure_args) # Don't use <malloc.h> for level in [".", "*", "*/*"]: files = glob.iglob(join_path(level, "*.[ch]")) filter_file(r"\<malloc\.h\>", "<stdlib.h>", *files) make() make("install") # The shared library is not installed correctly on Darwin if sys.platform == 'darwin': os.rename(join_path(prefix.lib, 'libpapi.so'), join_path(prefix.lib, 'libpapi.dylib')) fix_darwin_install_name(prefix.lib)
def install(self, spec, prefix): if '+lmsensors' in spec: with working_dir("src/components/lmsensors"): configure_args = [ "--with-sensors_incdir=%s/sensors" % spec['lm-sensors'].headers.directories[0], "--with-sensors_libdir=%s" % spec['lm-sensors'].libs.directories[0] ] configure(*configure_args) with working_dir("src"): configure_args = ["--prefix=%s" % prefix] # PAPI uses MPI if MPI is present; since we don't require # an MPI package, we ensure that all attempts to use MPI # fail, so that PAPI does not get confused configure_args.append('MPICC=:') configure_args.append('--with-components={0}'.format(' '.join( filter(lambda x: spec.variants[x].value, spec.variants)))) configure(*configure_args) # Don't use <malloc.h> for level in [".", "*", "*/*"]: files = glob.iglob(join_path(level, "*.[ch]")) filter_file(r"\<malloc\.h\>", "<stdlib.h>", *files) make() make("install") # The shared library is not installed correctly on Darwin if sys.platform == 'darwin': os.rename(join_path(prefix.lib, 'libpapi.so'), join_path(prefix.lib, 'libpapi.dylib')) fix_darwin_install_name(prefix.lib)
def fix_darwin_install(self): # The shared library is not installed correctly on Darwin if sys.platform == 'darwin': os.rename(join_path(self.prefix.lib, 'libpapi.so'), join_path(self.prefix.lib, 'libpapi.dylib')) fs.fix_darwin_install_name(self.prefix.lib)