Skip to content

Commit

Permalink
replacing VCPKG_PREFIX env var with MSYS2_PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
bigcat88 committed Aug 12, 2022
1 parent a9929a4 commit 373c91f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/create-release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
name: Wheels • windows • x86_64
runs-on: windows-2019
env:
VCPKG_PREFIX: "C:/temp/msys64/mingw64"
MSYS2_PREFIX: "C:/temp/msys64/mingw64"

steps:
- uses: actions/checkout@v3
Expand All @@ -60,14 +60,14 @@ jobs:
pacman -U mingw-w64-x86_64-libheif-1.12.0-9-any.pkg.tar.zst --noconfirm
- name: Remove DLL trailing data
run: ${{ env.VCPKG_PREFIX }}/bin/strip -s ${{ env.VCPKG_PREFIX }}/bin/*.dll
run: ${{ env.MSYS2_PREFIX }}/bin/strip -s ${{ env.MSYS2_PREFIX }}/bin/*.dll

- name: Run cibuildwheel
run: cibuildwheel
env:
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv -w {dest_dir} {wheel} --add-path ${{ env.VCPKG_PREFIX }}/bin"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv -w {dest_dir} {wheel} --add-path ${{ env.MSYS2_PREFIX }}/bin"

- name: Check built wheels
run: twine check wheelhouse/*
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test-src-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
name: Windows:2019-x86_64
runs-on: windows-2019
env:
VCPKG_PREFIX: "C:/temp/msys64/mingw64"
MSYS2_PREFIX: "C:/temp/msys64/mingw64"

steps:
- uses: actions/checkout@v3
Expand All @@ -55,13 +55,13 @@ jobs:
- name: Copy DLLs from MSYS2
run: |
$site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])')
cp ${{ env.VCPKG_PREFIX }}/bin/libheif.dll $site_packages/
cp ${{ env.VCPKG_PREFIX }}/bin/libde265-0.dll $site_packages/
cp ${{ env.VCPKG_PREFIX }}/bin/libx265.dll $site_packages/
cp ${{ env.VCPKG_PREFIX }}/bin/libaom.dll $site_packages/
cp ${{ env.VCPKG_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
cp ${{ env.VCPKG_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
cp ${{ env.VCPKG_PREFIX }}/bin/libstdc++-6.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libx265.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libaom.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
- name: Perform tests
run: python -m pytest -s
4 changes: 2 additions & 2 deletions libheif/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
if not include_path_prefix:
include_path_prefix = "/opt/local"
elif sys.platform.lower() == "win32":
include_path_prefix = getenv("VCPKG_PREFIX")
include_path_prefix = getenv("MSYS2_PREFIX")
if include_path_prefix is None:
include_path_prefix = "C:\\msys64\\mingw64"
warn(f"VCPKG_PREFIX environment variable is not set. Assuming `VCPKG_PREFIX={include_path_prefix}`")
warn(f"MSYS2_PREFIX environment variable is not set. Assuming `MSYS2_PREFIX={include_path_prefix}`")
else:
include_path_prefix = linux_build_libs.build_libs()

Expand Down

0 comments on commit 373c91f

Please sign in to comment.