From e5d1c84cfeec23e28f431af569da37b3b341cdcd Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 1 Feb 2020 12:27:38 +0300 Subject: boost/build/ci: build in predefined directory --- boost/build/ci/appveyor.py | 17 ++++++++++++----- boost/build/ci/travis.py | 15 +++++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) (limited to 'boost') diff --git a/boost/build/ci/appveyor.py b/boost/build/ci/appveyor.py index 7bc009a..4a55e20 100644 --- a/boost/build/ci/appveyor.py +++ b/boost/build/ci/appveyor.py @@ -12,12 +12,13 @@ the AppVeyor-defined environment variables. This script is rarely usefull, since AppVeyor images come with lots of pre-built Boost distributions, but still. -Boost is built in C:\. +Boost is built in C:\projects\boost. ''' import argparse import logging import os +import os.path import sys @@ -33,7 +34,11 @@ def _check_appveyor(): def _get_build_dir(): - return 'C:\\' + return 'C:\\projects' + + +def _get_boost_dir(): + return os.path.join(_get_build_dir(), 'boost') def _get_boost_version(): @@ -88,6 +93,10 @@ def build_appveyor(argv=None): ] build_main(appveyor_argv) + unpacked_boost_dir = version.dir_path(_get_build_dir()) + boost_dir = _get_boost_dir() + os.rename(unpacked_boost_dir, boost_dir) + appveyor_argv = [ 'build', '--configuration', _get_configuration(), @@ -98,9 +107,7 @@ def build_appveyor(argv=None): appveyor_argv += args.link if args.runtime_link is not None: appveyor_argv += ['--runtime-link', args.runtime_link] - appveyor_argv += [ - '--', version.dir_path(_get_build_dir()), - ] + appveyor_argv += ['--', boost_dir] build_main(appveyor_argv + args.b2_args) diff --git a/boost/build/ci/travis.py b/boost/build/ci/travis.py index f088c48..7bbb18d 100755 --- a/boost/build/ci/travis.py +++ b/boost/build/ci/travis.py @@ -10,12 +10,13 @@ This is similar to build.py, but auto-fills some parameters for build.py from the Travis-defined environment variables. -Boost is built in $HOME. +Boost is built in $HOME/boost. ''' import argparse import logging import os +import os.path import sys @@ -34,6 +35,10 @@ def _get_build_dir(): return _env('HOME') +def _get_boost_dir(): + return os.path.join(_get_build_dir(), 'boost') + + def _get_boost_version(): return _env('travis_boost_version') @@ -86,6 +91,10 @@ def build_travis(argv=None): ] build_main(travis_argv) + unpacked_boost_dir = version.dir_path(_get_build_dir()) + boost_dir = _get_boost_dir() + os.rename(unpacked_boost_dir, boost_dir) + travis_argv = [ 'build', '--configuration', _get_configuration(), @@ -96,9 +105,7 @@ def build_travis(argv=None): travis_argv += args.link if args.runtime_link is not None: travis_argv += ['--runtime-link', args.runtime_link] - travis_argv += [ - '--', version.dir_path(_get_build_dir()), - ] + travis_argv += ['--', boost_dir] build_main(travis_argv + args.b2_args) -- cgit v1.2.3