From 176490a08352cf6fa9f7f3441081828a3e27db8a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 5 Apr 2022 18:04:49 +0800 Subject: [PATCH] windows: fix more setuptools problems --- windows/PKGBUILD.common | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/windows/PKGBUILD.common b/windows/PKGBUILD.common index da3706883..e5d8e2a74 100644 --- a/windows/PKGBUILD.common +++ b/windows/PKGBUILD.common @@ -12,7 +12,19 @@ build() { cd source wine-msys2-build python setup.py install --single-version-externally-managed --prefix=../mingw64 --record=setuptools-sucks.txt cd .. + + # setuptools creates this file if it doesn't already exist, which causes conflicts between pacman packages + # see: https://corte.si/posts/code/setuptoolssucks/ rm -f mingw64/lib/python3.9/site-packages/easy-install.pth + # patch broken shebangs (Z:/nix/store/...) + for entrypoint in mingw64/bin/*-script.py; do + [ -f "$entrypoint" ] || continue + sed -i "1s|#!.*|#!python|" $entrypoint + done + for entrypoint in mingw64/bin/*-script.pyw; do + [ -f "$entrypoint" ] || continue + sed -i "1s|#!.*|#!pythonw|" $entrypoint + done } package() {