mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
bpo-33522: Enable CI builds on Visual Studio Team Services (#6865)
This commit is contained in:
parent
713a936736
commit
e5f41d2f1e
22 changed files with 603 additions and 25 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue