Changing variable name of BuildSelector instance, updating Python version in test 04_build_skip, and adding unit tests for BuildSelector
This commit is contained in:
@@ -99,7 +99,7 @@ def main():
|
||||
traceback.print_exc(None, sys.stderr)
|
||||
exit(2)
|
||||
|
||||
selection = BuildSelector(build_config, skip_config)
|
||||
build_selector = BuildSelector(build_config, skip_config)
|
||||
|
||||
# Add CIBUILDWHEEL environment variable
|
||||
# This needs to be passed on to the docker container in linux.py
|
||||
@@ -134,7 +134,7 @@ def main():
|
||||
test_requires=test_requires,
|
||||
before_build=before_build,
|
||||
build_verbosity=build_verbosity,
|
||||
selection=selection,
|
||||
build_selector=build_selector,
|
||||
environment=environment,
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ except ImportError:
|
||||
from pipes import quote as shlex_quote
|
||||
|
||||
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, build_verbosity, selection, environment, manylinux1_images):
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment, manylinux1_images):
|
||||
try:
|
||||
subprocess.check_call(['docker', '--version'])
|
||||
except:
|
||||
@@ -36,7 +36,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
||||
]
|
||||
|
||||
# skip builds as required
|
||||
python_configurations = [c for c in python_configurations if selection(c.identifier)]
|
||||
python_configurations = [c for c in python_configurations if build_selector(c.identifier)]
|
||||
|
||||
platforms = [
|
||||
('manylinux1_x86_64', manylinux1_images.get('x86_64') or 'quay.io/pypa/manylinux1_x86_64'),
|
||||
|
||||
@@ -10,7 +10,7 @@ except ImportError:
|
||||
from .util import prepare_command, get_build_verbosity_extra_flags
|
||||
|
||||
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, build_verbosity, selection, environment):
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):
|
||||
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'identifier', 'url'])
|
||||
python_configurations = [
|
||||
PythonConfiguration(version='2.7', identifier='cp27-macosx_10_6_intel', url='https://www.python.org/ftp/python/2.7.15/python-2.7.15-macosx10.6.pkg'),
|
||||
@@ -42,7 +42,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
||||
call(['curl', '-L', '-o', get_pip_script, get_pip_url])
|
||||
|
||||
for config in python_configurations:
|
||||
if not selection(config.identifier):
|
||||
if not build_selector(config.identifier):
|
||||
print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)
|
||||
continue
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from glob import glob
|
||||
from .util import prepare_command, get_build_verbosity_extra_flags
|
||||
|
||||
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, build_verbosity, selection, environment):
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):
|
||||
# run_with_env is a cmd file that sets the right environment variables to
|
||||
run_with_env = os.path.join(tempfile.gettempdir(), 'appveyor_run_with_env.cmd')
|
||||
if not os.path.exists(run_with_env):
|
||||
@@ -45,7 +45,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
||||
built_wheel_dir = os.path.join(temp_dir, 'built_wheel')
|
||||
|
||||
for config in python_configurations:
|
||||
if not selection(config.identifier):
|
||||
if not build_selector(config.identifier):
|
||||
print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user