Skip to content
Permalink
Browse files

Do not require cffi if pytorch build is disabled (#1014)

Signed-off-by: Nathan Luehr <nluehr@nvidia.com>
  • Loading branch information...
nluehr authored and alsrgv committed Apr 19, 2019
1 parent da85af2 commit 2770fcaddbbd41f48149dd344e884c9c2851edb0
Showing with 6 additions and 2 deletions.
  1. +6 −2 setup.py
@@ -987,6 +987,10 @@ def build_extensions(self):
raise DistutilsError(
'None of TensorFlow, PyTorch, or MXNet plugins were built. See errors above.')

require_list = ['cloudpickle', 'psutil', 'six']
# Skip cffi if pytorch extension explicitly disabled
if not os.environ.get('HOROVOD_WITHOUT_PYTORCH'):
require_list.append('cffi>=1.4.0')

setup(name='horovod',
version=__version__,
@@ -1007,7 +1011,7 @@ def build_extensions(self):
# If cffi is specified in setup_requires, it will need libffi to be installed on the machine,
# which is undesirable. Luckily, `install` action will install cffi before executing build,
# so it's only necessary for `build*` or `bdist*` actions.
setup_requires=['cffi>=1.4.0', 'cloudpickle', 'psutil', 'six'] if is_build_action() else [],
install_requires=['cffi>=1.4.0', 'cloudpickle', 'psutil', 'six'],
setup_requires=require_list if is_build_action() else [],
install_requires=require_list,
zip_safe=False,
scripts=['bin/horovodrun'])

0 comments on commit 2770fca

Please sign in to comment.
You can’t perform that action at this time.