Call delocate with the correct archs
This commit is contained in:
@@ -118,7 +118,7 @@ def main() -> None:
|
||||
if platform == 'linux':
|
||||
repair_command_default = 'auditwheel repair -w {dest_dir} {wheel}'
|
||||
elif platform == 'macos':
|
||||
repair_command_default = 'delocate-listdeps {wheel} && delocate-wheel --require-archs x86_64 -w {dest_dir} {wheel}'
|
||||
repair_command_default = 'delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}'
|
||||
else:
|
||||
repair_command_default = ''
|
||||
|
||||
|
||||
+14
-1
@@ -250,7 +250,20 @@ def build(options: BuildOptions) -> None:
|
||||
|
||||
if options.repair_command:
|
||||
log.step('Repairing wheel...')
|
||||
repair_command_prepared = prepare_command(options.repair_command, wheel=built_wheel, dest_dir=repaired_wheel_dir)
|
||||
|
||||
if config.identifier.endswith('universal2'):
|
||||
delocate_archs = 'x86_64,arm64'
|
||||
elif config.identifier.endswith('arm64'):
|
||||
delocate_archs = 'arm64'
|
||||
else:
|
||||
delocate_archs = 'x86_64'
|
||||
|
||||
repair_command_prepared = prepare_command(
|
||||
options.repair_command,
|
||||
wheel=built_wheel,
|
||||
dest_dir=repaired_wheel_dir,
|
||||
delocate_archs=delocate_archs,
|
||||
)
|
||||
call(repair_command_prepared, env=env, shell=True)
|
||||
else:
|
||||
shutil.move(str(built_wheel), repaired_wheel_dir)
|
||||
|
||||
+3
-2
@@ -255,7 +255,7 @@ CIBW_BEFORE_BUILD: "{package}/bin/prepare_for_build.sh"
|
||||
Default:
|
||||
|
||||
- on Linux: `'auditwheel repair -w {dest_dir} {wheel}'`
|
||||
- on macOS: `'delocate-listdeps {wheel} && delocate-wheel --require-archs x86_64 -w {dest_dir} {wheel}'`
|
||||
- on macOS: `'delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}'`
|
||||
- on Windows: `''`
|
||||
|
||||
A shell command to repair a built wheel by copying external library dependencies into the wheel tree and relinking them.
|
||||
@@ -264,7 +264,8 @@ The command is run on each built wheel (except for pure Python ones) before test
|
||||
The following placeholders must be used inside the command and will be replaced by `cibuildwheel`:
|
||||
|
||||
- `{wheel}` for the absolute path to the built wheel
|
||||
- `{dest_dir}` for the absolute path of the directory where to create the repaired wheel.
|
||||
- `{dest_dir}` for the absolute path of the directory where to create the repaired wheel
|
||||
- `{delocate_archs}` (macOS only) comma-separated list of architectures in the wheel.
|
||||
|
||||
The command is run in a shell, so you can run multiple commands like `cmd1 && cmd2`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user