From 97c9127b358aa2c96cf4dc5fb576d85894508c98 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Sat, 27 Apr 2019 18:40:51 +0200 Subject: [PATCH 1/2] Handle new multi-deps python setup with EBPYTHONPREFIXES for tensorflow --- easybuild/easyblocks/t/tensorflow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/t/tensorflow.py b/easybuild/easyblocks/t/tensorflow.py index fa37c5855eb..b13e379e6b1 100644 --- a/easybuild/easyblocks/t/tensorflow.py +++ b/easybuild/easyblocks/t/tensorflow.py @@ -362,9 +362,11 @@ def build_step(self): # this is required to make sure that Python packages included as extensions are found at build time; # see also https://github.com/tensorflow/tensorflow/issues/22395 pythonpath = os.getenv('PYTHONPATH', '') - env.setvar('PYTHONPATH', '%s:%s' % (os.path.join(self.installdir, self.pylibdir), pythonpath)) + env.setvar('PYTHONPATH', os.pathsep.join([os.path.join(self.installdir, self.pylibdir), pythonpath])) cmd.append('--action_env=PYTHONPATH') + # Also export EBPYTHONPREFIXES to handle the new multi-deps python setup + cmd.append('--action_env=EBPYTHONPREFIXES') # use same configuration for both host and target programs, which can speed up the build # only done when optarch is enabled, since this implicitely assumes that host and target platform are the same From 0d25db042408206d78c36b90516f59d1d2239c11 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 29 Apr 2019 21:31:12 +0200 Subject: [PATCH 2/2] Add reference to PR that enables multi-deps. Make adding EBPYTHONPREFIXES conditional on existance. --- easybuild/easyblocks/t/tensorflow.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/t/tensorflow.py b/easybuild/easyblocks/t/tensorflow.py index b13e379e6b1..e3117cf05b6 100644 --- a/easybuild/easyblocks/t/tensorflow.py +++ b/easybuild/easyblocks/t/tensorflow.py @@ -365,8 +365,10 @@ def build_step(self): env.setvar('PYTHONPATH', os.pathsep.join([os.path.join(self.installdir, self.pylibdir), pythonpath])) cmd.append('--action_env=PYTHONPATH') - # Also export EBPYTHONPREFIXES to handle the new multi-deps python setup - cmd.append('--action_env=EBPYTHONPREFIXES') + # Also export $EBPYTHONPREFIXES to handle the multi-deps python setup + # See https://github.com/easybuilders/easybuild-easyblocks/pull/1664 + if 'EBPYTHONPREFIXES' in os.environ: + cmd.append('--action_env=EBPYTHONPREFIXES') # use same configuration for both host and target programs, which can speed up the build # only done when optarch is enabled, since this implicitely assumes that host and target platform are the same