From 0efe54f72285138e766b84cd889ebaf5a6d88c58 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez <30461003+jonglezb@users.noreply.github.com> Date: Wed, 27 Jan 2021 14:53:09 +0100 Subject: [PATCH] mxnet: Fix python lib installation (#21298) --- var/spack/repos/builtin/packages/mxnet/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mxnet/package.py b/var/spack/repos/builtin/packages/mxnet/package.py index 5cc9977ef3..2a5e652120 100644 --- a/var/spack/repos/builtin/packages/mxnet/package.py +++ b/var/spack/repos/builtin/packages/mxnet/package.py @@ -127,5 +127,8 @@ def install(self, spec, prefix): # install python bindings if '+python' in spec: - python = which('python') - python('python/setup.py', 'install', '--prefix={0}'.format(prefix)) + # The python libs are in a separate dir, and it is necessary to change + # directory so that setup.py picks them up. + with working_dir('python'): + setup_py('install', '--prefix={0}'.format(prefix), + '--single-version-externally-managed', '--root=/')