Skip to content

Commit

Permalink
Merge pull request #270 from wpoely86/psi4b5-ictce-mt
Browse files Browse the repository at this point in the history
Psi: python 2.4 compatibility + small bug fixed
  • Loading branch information
boegel committed Oct 11, 2013
2 parents 898e1df + f9704c8 commit d6336ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions easybuild/easyblocks/p/psi.py
Expand Up @@ -47,6 +47,7 @@ def __init__(self, *args, **kwargs):
"""Initialize class variables custom to PSI."""
super(EB_PSI, self).__init__(*args, **kwargs)

self.psi_srcdir = None
self.install_psi_objdir = None
self.install_psi_srcdir = None

Expand Down Expand Up @@ -87,7 +88,7 @@ def configure_step(self):
('cxx', 'CXX'),
('fc', fcompvar),
('libdirs', 'LDFLAGS'),
('blas', 'LIBBLAS_MT'),
('blas', 'LIBBLAS_MT'),
('lapack', 'LIBLAPACK_MT'),
]
for (opt, var) in opt_vars:
Expand All @@ -114,8 +115,9 @@ def configure_step(self):

# In order to create new plugins with PSI, it needs to know the location of the source
# and the obj dir after install. These env vars give that information to the configure script.
self.psi_srcdir = os.path.basename(self.cfg['start_dir'].rstrip(os.sep))
self.install_psi_objdir = os.path.join(self.installdir, 'obj')
self.install_psi_srcdir = os.path.join(self.installdir, os.path.basename(self.cfg['start_dir']))
self.install_psi_srcdir = os.path.join(self.installdir, self.psi_srcdir)
env.setvar('PSI_OBJ_INSTALL_DIR', self.install_psi_objdir)
env.setvar('PSI_SRC_INSTALL_DIR', self.install_psi_srcdir)

Expand All @@ -127,7 +129,7 @@ def install_step(self):

# the obj and unpacked sources must remain available for working with plugins
try:
for subdir in ['obj', os.path.basename(self.cfg['start_dir'])]:
for subdir in ['obj', self.psi_srcdir]:
shutil.copytree(os.path.join(self.builddir, subdir), os.path.join(self.installdir, subdir))
except OSError, err:
self.log.error("Failed to copy obj and unpacked sources to install dir: %s" % err)
Expand Down

0 comments on commit d6336ba

Please sign in to comment.