Skip to content

Consider making {project} placeholder available to repair-wheel-command #2588

@arcondello

Description

@arcondello

Description

I would like to be able to run a script defined in my repo as part of the repair-wheel-command.

Currently, I can hard-code the path for each OS

[[tool.cibuildwheel.overrides]]
select = "*-????linux_*"
inherit.repair-wheel-command = "prepend"
repair-wheel-command = "python /project/scripts/_fix_wheel.py {wheel}"

[[tool.cibuildwheel.overrides]]
select = "*-macosx_*"
inherit.repair-wheel-command = "prepend"
repair-wheel-command = "python ./scripts/_fix_wheel.py {wheel}"

but I'd like to make it more general and more future-proof.

repair-wheel-command = "python {project}/scripts/_fix_wheel.py {wheel}"

I believe this can be accomplished by adding project= to

repair_command_prepared = prepare_command(
build_options.repair_command, wheel=built_wheel, dest_dir=repaired_wheel_dir
)
and similar for the other OS.

If there is agreement that this is OK and there are no other side effects I should be aware of, I would be happy to make the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions