Implement Windows release builds in Azure Pipelines (GH-14065)

Includes backported fixes from GH-14091
This commit is contained in:
Steve Dower 2019-06-14 14:20:16 -07:00 committed by GitHub
parent 322281e7ca
commit f78e66c3c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 1702 additions and 169 deletions

View file

@ -11,15 +11,11 @@ import shutil
import subprocess
import sys
__all__ = []
from .filesets import *
__all__ = ["extract_pip_files", "get_pip_layout"]
def public(f):
__all__.append(f.__name__)
return f
@public
def get_pip_dir(ns):
if ns.copy:
if ns.zip_lib:
@ -29,10 +25,23 @@ def get_pip_dir(ns):
return ns.temp / "packages"
@public
def get_pip_layout(ns):
pip_dir = get_pip_dir(ns)
if not pip_dir.is_dir():
log_warning("Failed to find {} - pip will not be included", pip_dir)
else:
pkg_root = "packages/{}" if ns.zip_lib else "Lib/site-packages/{}"
for dest, src in rglob(pip_dir, "**/*"):
yield pkg_root.format(dest), src
yield "pip.ini", ("pip.ini", b"[global]\nuser=yes")
def extract_pip_files(ns):
dest = get_pip_dir(ns)
dest.mkdir(parents=True, exist_ok=True)
try:
dest.mkdir(parents=True, exist_ok=False)
except IOError:
return
src = ns.source / "Lib" / "ensurepip" / "_bundled"
@ -58,6 +67,7 @@ def extract_pip_files(ns):
"--target",
str(dest),
"--no-index",
"--no-compile",
"--no-cache-dir",
"-f",
str(src),