diff mbox series

[rdma-core,6/7] cbuild: Do not require yaml to always be installed

Message ID 20190521190124.27486-7-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show
Series More fixes for building | expand

Commit Message

Jason Gunthorpe May 21, 2019, 7:01 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

We only need this for the travis related commands.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/cbuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/buildlib/cbuild b/buildlib/cbuild
index a0b4a7e3e52117..2bd869cc28cbe1 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -52,7 +52,6 @@  import shutil
 import subprocess
 import sys
 import tempfile
-import yaml
 from contextlib import contextmanager;
 
 project = "rdma-core";
@@ -239,6 +238,7 @@  class travis(APTEnvironment):
     _yaml = None;
 
     def get_yaml(self):
+        import yaml
         if self._yaml:
             return self._yaml;
 
@@ -696,6 +696,7 @@  def copy_abi_files(src):
             shutil.copy(cur_fn, ref_fn);
 
 def run_travis_build(args,env):
+    import yaml
     with private_tmp(args) as tmpdir:
         os.mkdir(os.path.join(tmpdir,"src"));
         os.mkdir(os.path.join(tmpdir,"tmp"));