Skip to content

Commit 88ffa03

Browse files
committed
Try this ...
1 parent 4de4cc3 commit 88ffa03

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/buildwheel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
env:
6565
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows_arm64.sh
6666
CIBW_BEFORE_BUILD_WINDOWS: python bin/cibw_before_build_windows_arm64.py && msys2 -c bin/cibw_before_build_windows_arm64.sh && pip install wheel delvewheel
67+
PYTHONPATH: ${{ github.workspace }}\.local\python-site
6768

6869
# After all the Windows-specific steps above this is what actually
6970
# builds the wheels for every other OS:

bin/cibw_before_build_windows_arm64.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,18 @@ def main() -> None:
8080
env_path = repo_root / '.local' / 'cibw_before_build_windows_arm64.env'
8181
env_text = ''.join(f'{key}={shlex.quote(value)}\n' for key, value in values.items())
8282
env_path.write_text(env_text, encoding='utf-8')
83+
84+
python_site = repo_root / '.local' / 'python-site'
85+
python_site.mkdir(parents=True, exist_ok=True)
86+
sitecustomize = python_site / 'sitecustomize.py'
87+
sitecustomize.write_text(
88+
'import sysconfig\n'
89+
f"sysconfig.get_config_vars()['LIBPC'] = {values['PKGCONFIG_DIR']!r}\n",
90+
encoding='utf-8',
91+
)
92+
8393
print(f'Generated {env_path}')
94+
print(f'Generated {sitecustomize}')
8495

8596

8697
if __name__ == '__main__':

0 commit comments

Comments
 (0)