@@ -170,7 +170,7 @@ def expected_wheels(
170170 macosx_deployment_target : str | None = None ,
171171 iphoneos_deployment_target : str | None = None ,
172172 machine_arch : str | None = None ,
173- platform : str = platform ,
173+ platform : str | None = None ,
174174 python_abi_tags : list [str ] | None = None ,
175175 include_universal2 : bool = False ,
176176 single_python : bool = False ,
@@ -179,9 +179,11 @@ def expected_wheels(
179179 """
180180 Returns the expected wheels from a run of cibuildwheel.
181181 """
182+ platform = platform or get_platform ()
183+
182184 if machine_arch is None :
183185 machine_arch = pm .machine ()
184- if get_platform () == "linux" :
186+ if platform == "linux" :
185187 machine_arch = arch_name_for_linux (machine_arch )
186188
187189 if macosx_deployment_target is None :
@@ -192,7 +194,7 @@ def expected_wheels(
192194
193195 architectures = [machine_arch ]
194196 if not single_arch :
195- if get_platform () == "linux" :
197+ if platform == "linux" :
196198 if machine_arch == "x86_64" :
197199 architectures .append ("i686" )
198200 elif (
@@ -201,7 +203,7 @@ def expected_wheels(
201203 and _AARCH64_CAN_RUN_ARMV7
202204 ):
203205 architectures .append ("armv7l" )
204- elif get_platform () == "windows" and machine_arch == "AMD64" :
206+ elif platform == "windows" and machine_arch == "AMD64" :
205207 architectures .append ("x86" )
206208
207209 return [
@@ -239,8 +241,6 @@ def _expected_wheels(
239241 """
240242 Returns a list of expected wheels from a run of cibuildwheel.
241243 """
242- platform = get_platform ()
243-
244244 # per PEP 425 (https://www.python.org/dev/peps/pep-0425/), wheel files shall have name of the form
245245 # {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl
246246 # {python tag} and {abi tag} are closely related to the python interpreter used to build the wheel
0 commit comments