Skip to content

Commit

Permalink
use cibw path
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jan 31, 2024
1 parent e30e63b commit a442ba6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,22 @@ runs:
def post_setup(self, context):
super().post_setup(context)
self.python_path = context.env_exe
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
self.cibw_path = [path for path in Path(context.bin_path).glob("cibuildwheel*") if path.stem == "cibuildwheel"][0]
print("::group::Install cibuildwheel")
builder = EnvBuilder()
builder.create(Path(r"${{ runner.temp }}") / "cibw")
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
f.write(f"python-path={builder.python_path}\n")
f.write(f"cibw-path={builder.cibw_path}\n")
print("::endgroup::")
EOF
shell: bash

# Redirecting stderr to stdout to fix interleaving issue in Actions.
- run: >
'${{ steps.cibw.outputs.python-path }}' -m
cibuildwheel
'${{ steps.cibw.outputs.cibw-path }}'
"${{ inputs.package-dir }}"
--output-dir "${{ inputs.output-dir }}"
--config-file "${{ inputs.config-file }}"
Expand All @@ -85,8 +84,7 @@ runs:
if ($PSNativeCommandArgumentPassing) {
$PSNativeCommandArgumentPassing = 'Legacy'
};
& "${{ steps.cibw.outputs.python-path }}" -m
cibuildwheel
& "${{ steps.cibw.outputs.cibw-path }}"
"${{ inputs.package-dir }}"
--output-dir '"${{ inputs.output-dir }}"'
--config-file '"${{ inputs.config-file }}"'
Expand Down

0 comments on commit a442ba6

Please sign in to comment.