bpo-33522: Enable CI builds on Visual Studio Team Services (#6865)

This commit is contained in:
Steve Dower 2018-05-16 17:50:29 -04:00 committed by GitHub
parent 713a936736
commit e5f41d2f1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 603 additions and 25 deletions

View file

@ -125,6 +125,11 @@
"all and runs the test suite."
)
)
parser.add_argument(
'--system',
default='',
help="Override the automatic system type detection."
)
class AbstractBuilder(object):
@ -152,6 +157,7 @@ def __init__(self, version, args):
# build directory (removed after install)
self.build_dir = os.path.join(
self.src_dir, self.build_template.format(version))
self.system = args.system
def __str__(self):
return "<{0.__class__.__name__} for {0.version}>".format(self)
@ -255,9 +261,13 @@ def _build_src(self):
log.info("Running build in {}".format(self.build_dir))
cwd = self.build_dir
cmd = ["./config", "shared", "--prefix={}".format(self.install_dir)]
self._subprocess_call(cmd, cwd=cwd)
env = None
if self.system:
env = os.environ.copy()
env['SYSTEM'] = self.system
self._subprocess_call(cmd, cwd=cwd, env=env)
# Old OpenSSL versions do not support parallel builds.
self._subprocess_call(["make", "-j1"], cwd=cwd)
self._subprocess_call(["make", "-j1"], cwd=cwd, env=env)
def _make_install(self, remove=True):
self._subprocess_call(