Merge remote-tracking branch 'origin/master' into azure-windows

This commit is contained in:
Joe Rickerby
2019-04-27 10:22:00 +01:00
23 changed files with 320 additions and 97 deletions
+26 -24
View File
@@ -36,6 +36,30 @@ def get_python_path(config):
)
def get_python_configurations(build_selector):
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'arch', 'identifier', 'path'])
python_configurations = [
PythonConfiguration(version='2.7.x', arch="32", identifier='cp27-win32', path='C:\Python27'),
PythonConfiguration(version='2.7.x', arch="64", identifier='cp27-win_amd64', path='C:\Python27-x64'),
PythonConfiguration(version='3.4.x', arch="32", identifier='cp34-win32', path='C:\Python34'),
PythonConfiguration(version='3.4.x', arch="64", identifier='cp34-win_amd64', path='C:\Python34-x64'),
PythonConfiguration(version='3.5.x', arch="32", identifier='cp35-win32', path='C:\Python35'),
PythonConfiguration(version='3.5.x', arch="64", identifier='cp35-win_amd64', path='C:\Python35-x64'),
PythonConfiguration(version='3.6.x', arch="32", identifier='cp36-win32', path='C:\Python36'),
PythonConfiguration(version='3.6.x', arch="64", identifier='cp36-win_amd64', path='C:\Python36-x64'),
PythonConfiguration(version='3.7.x', arch="32", identifier='cp37-win32', path='C:\Python37'),
PythonConfiguration(version='3.7.x', arch="64", identifier='cp37-win_amd64', path='C:\Python37-x64'),
]
if IS_RUNNING_ON_AZURE:
# Python 3.4 isn't supported on Azure.
# See https://github.com/Microsoft/azure-pipelines-tasks/issues/9674
python_configurations = [c for c in python_configurations if c.version != '3.4.x']
# skip builds as required
return [c for c in python_configurations if build_selector(c.identifier)]
def build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):
if IS_RUNNING_ON_AZURE:
def shell(args, env=None, cwd=None):
@@ -53,35 +77,13 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
args = ['cmd', '/E:ON', '/V:ON', '/C', run_with_env] + args
return subprocess.check_call(' '.join(args), env=env, cwd=cwd)
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'arch', 'identifier'])
python_configurations = [
PythonConfiguration(version='2.7.x', arch="32", identifier='cp27-win32'),
PythonConfiguration(version='2.7.x', arch="64", identifier='cp27-win_amd64'),
PythonConfiguration(version='3.4.x', arch="32", identifier='cp34-win32'),
PythonConfiguration(version='3.4.x', arch="64", identifier='cp34-win_amd64'),
PythonConfiguration(version='3.5.x', arch="32", identifier='cp35-win32'),
PythonConfiguration(version='3.5.x', arch="64", identifier='cp35-win_amd64'),
PythonConfiguration(version='3.6.x', arch="32", identifier='cp36-win32'),
PythonConfiguration(version='3.6.x', arch="64", identifier='cp36-win_amd64'),
PythonConfiguration(version='3.7.x', arch="32", identifier='cp37-win32'),
PythonConfiguration(version='3.7.x', arch="64", identifier='cp37-win_amd64'),
]
if IS_RUNNING_ON_AZURE:
# Python 3.4 isn't supported on Azure.
# See https://github.com/Microsoft/azure-pipelines-tasks/issues/9674
python_configurations = [c for c in python_configurations if c.version != '3.4.x']
abs_project_dir = os.path.abspath(project_dir)
temp_dir = tempfile.mkdtemp(prefix='cibuildwheel')
built_wheel_dir = os.path.join(temp_dir, 'built_wheel')
python_configurations = get_python_configurations(build_selector)
for config in python_configurations:
if not build_selector(config.identifier):
print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)
continue
config_python_path = get_python_path(config)
# check python & pip exist for this configuration