From 24bb3c61de6aff0972f8f568e86a81df8778add4 Mon Sep 17 00:00:00 2001 From: Luigi Calori Date: Thu, 9 Nov 2017 06:10:50 +0100 Subject: 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 --- var/spack/repos/builtin/packages/perl/package.py | 14 ++++++++------ 1 file 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. -- cgit v1.2.3-70-g09d2