summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Calori <l.calori@cineca.it>2017-11-09 06:10:50 +0100
committerChristoph Junghans <christoph.junghans@gmail.com>2017-11-08 22:10:50 -0700
commit24bb3c61de6aff0972f8f568e86a81df8778add4 (patch)
treeeaef5d82587bfaecce32c5297efcd177eb6b4b96
parenta754bd7eeea3c83cd097d3b979787acc9e684b1a (diff)
downloadspack-24bb3c61de6aff0972f8f568e86a81df8778add4.tar.gz
spack-24bb3c61de6aff0972f8f568e86a81df8778add4.tar.bz2
spack-24bb3c61de6aff0972f8f568e86a81df8778add4.tar.xz
spack-24bb3c61de6aff0972f8f568e86a81df8778add4.zip
fix perl dependent modules, #5900 (#5937)
* FIX perl dependent environmwent setup to avoid void lines in generated modules as #5900 * remove debug prints * fix flake8
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index cd1acd1695..fbf788d106 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -167,12 +167,14 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
if d.package.extends(self.spec):
perl_lib_dirs.append(d.prefix.lib.perl5)
perl_bin_dirs.append(d.prefix.bin)
- perl_bin_path = ':'.join(perl_bin_dirs)
- perl_lib_path = ':'.join(perl_lib_dirs)
- spack_env.prepend_path('PATH', perl_bin_path)
- spack_env.prepend_path('PERL5LIB', perl_lib_path)
- run_env.prepend_path('PATH', perl_bin_path)
- run_env.prepend_path('PERL5LIB', perl_lib_path)
+ if perl_bin_dirs:
+ perl_bin_path = ':'.join(perl_bin_dirs)
+ spack_env.prepend_path('PATH', perl_bin_path)
+ run_env.prepend_path('PATH', perl_bin_path)
+ if perl_lib_dirs:
+ perl_lib_path = ':'.join(perl_lib_dirs)
+ spack_env.prepend_path('PERL5LIB', perl_lib_path)
+ run_env.prepend_path('PERL5LIB', perl_lib_path)
def setup_dependent_package(self, module, dependent_spec):
"""Called before perl modules' install() methods.