diff options
-rwxr-xr-x | src/python/botan2.py | 2 | ||||
-rwxr-xr-x | src/scripts/ci_build.py | 34 |
2 files changed, 23 insertions, 13 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py index 263bb8078..fa03af57c 100755 --- a/src/python/botan2.py +++ b/src/python/botan2.py @@ -52,7 +52,7 @@ class BotanException(Exception): def _load_botan_dll(expected_version): - possible_dll_names = ['libbotan-2.dylib', 'libbotan-2.so'] + \ + possible_dll_names = ['libbotan-2.dylib', 'libbotan-2.so', 'botan.dll'] + \ ['libbotan-2.so.%d' % (v) for v in reversed(range(8, 16))] for dll_name in possible_dll_names: diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index 76a50a8c9..bb59245f5 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -224,13 +224,15 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, ccache, ro if target_os == 'windows' and target in ['shared', 'static']: # ./configure.py needs extra hand-holding for boost on windows - boost_root = os.environ['BOOST_ROOT'] - boost_libs = os.environ['BOOST_LIBRARYDIR'] - boost_system = os.environ['BOOST_SYSTEM_LIBRARY'] - flags += ['--with-boost', - '--with-external-includedir', boost_root, - '--with-external-libdir', boost_libs, - '--boost-library-name', boost_system] + boost_root = os.environ.get('BOOST_ROOT') + boost_libs = os.environ.get('BOOST_LIBRARYDIR') + boost_system = os.environ.get('BOOST_SYSTEM_LIBRARY') + + if boost_root and boost_libs and boost_system: + flags += ['--with-boost', + '--with-external-includedir', boost_root, + '--with-external-libdir', boost_libs, + '--boost-library-name', boost_system] if target_os == 'linux': flags += ['--with-lzma'] @@ -381,7 +383,10 @@ def main(args=None): print('Skipping build COVERITY_SCAN_BRANCH set in environment') return 0 - (options, args) = parse_args(args or sys.argv) + if args is None: + args = sys.argv + print("Invoked as '%s'" % (' '.join(args))) + (options, args) = parse_args(args) if len(args) != 2: print('Usage: %s [options] target' % (args[0])) @@ -543,10 +548,15 @@ def main(args=None): if target in ['shared', 'coverage']: - if use_python2: - cmds.append(['python2', '-b', python_tests]) - if use_python3: - cmds.append(['python3', '-b', python_tests]) + if options.os == 'windows': + if options.cpu == 'x86': + # Python on AppVeyor is a 32-bit binary so only test for 32-bit + cmds.append([py_interp, '-b', python_tests]) + else: + if use_python2: + cmds.append(['python2', '-b', python_tests]) + if use_python3: + cmds.append(['python3', '-b', python_tests]) if target in ['shared', 'static', 'bsi', 'nist']: cmds.append(make_cmd + ['install']) |