Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psi: python 2.4 compatibility + small bug fixed #270

Merged
merged 3 commits into from Oct 11, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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