diff options
author | Alexander Bokovoy <ab@samba.org> | 2018-01-31 11:48:43 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-09-05 06:37:22 +0200 |
commit | 4e65b33c1d40bb2c243f775f388056aed31d8671 (patch) | |
tree | 5a41b6ddef7ce1c0b6a93bcc16ef89da10f080e8 /third_party/waf/waflib/Tools/ruby.py | |
parent | faef27506977db01cc4619140a71652463914378 (diff) | |
download | samba-4e65b33c1d40bb2c243f775f388056aed31d8671.tar.gz |
third_party:waf: update to upstream 2.0.4 release
Update third_party/waf/ to 2.0.4 to bring us closer to Python 3
This change requires a number of changes in buildtools/ too.
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party/waf/waflib/Tools/ruby.py')
-rw-r--r-- | third_party/waf/waflib/Tools/ruby.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/third_party/waf/waflib/Tools/ruby.py b/third_party/waf/waflib/Tools/ruby.py index b407c3698b8..f5107aaa141 100644 --- a/third_party/waf/waflib/Tools/ruby.py +++ b/third_party/waf/waflib/Tools/ruby.py @@ -5,7 +5,7 @@ #!/usr/bin/env python # encoding: utf-8 # daniel.svensson at purplescout.se 2008 -# Thomas Nagy 2016 (ita) +# Thomas Nagy 2016-2018 (ita) """ Support for Ruby extensions. A C/C++ compiler is required:: @@ -27,7 +27,7 @@ Support for Ruby extensions. A C/C++ compiler is required:: """ import os -from waflib import Options, Utils, Task +from waflib import Errors, Options, Task, Utils from waflib.TaskGen import before_method, feature, extension from waflib.Configure import conf @@ -64,13 +64,13 @@ def check_ruby_version(self, minver=()): try: version = self.cmd_and_log(ruby + ['-e', 'puts defined?(VERSION) ? VERSION : RUBY_VERSION']).strip() - except Exception: + except Errors.WafError: self.fatal('could not determine ruby version') self.env.RUBY_VERSION = version try: - ver = tuple(map(int, version.split("."))) - except Exception: + ver = tuple(map(int, version.split('.'))) + except Errors.WafError: self.fatal('unsupported ruby version %r' % version) cver = '' @@ -155,7 +155,7 @@ def check_ruby_module(self, module_name): self.start_msg('Ruby module %s' % module_name) try: self.cmd_and_log(self.env.RUBY + ['-e', 'require \'%s\';puts 1' % module_name]) - except Exception: + except Errors.WafError: self.end_msg(False) self.fatal('Could not find the ruby module %r' % module_name) self.end_msg(True) @@ -187,3 +187,4 @@ def options(opt): opt.add_option('--with-ruby-archdir', type='string', dest='rubyarchdir', help='Specify directory where to install arch specific files') opt.add_option('--with-ruby-libdir', type='string', dest='rubylibdir', help='Specify alternate ruby library path') opt.add_option('--with-ruby-binary', type='string', dest='rubybinary', help='Specify alternate ruby binary') + |