From 138d78a1ec4a076cfcab89ea83f62bc8a0c8a6ca Mon Sep 17 00:00:00 2001
From: Lex Neva <github.com@lexneva.name>
Date: Fri, 12 Jan 2018 20:04:44 -0500
Subject: [PATCH] fix LD_LIBRARY_PATH hack

---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index bc756afad..12511d4b3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,14 @@
 EXTENSIONS:=embroider embroider_params embroider_simulate embroider_update
 VERSION:=$(shell git tag -l | grep ^v | tail -n 1)
 TARBALL:=inkstitch-$(VERSION)-$(shell uname)-$(shell uname -m).tar.gz
-WX_PATH:=$(shell python -c 'import wx; print wx.__path__[0]')
+SITE_PACKAGES:=$(shell python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")
 
-dist: distcleanhttps://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34
+dist: distclean
 	mkdir -p dist/inkstitch/bin
 	for extension in $(EXTENSIONS); do \
         \
 		`# without this, it seems that pyinstaller can't find all of wxpython's shared libraries` \
-		LD_LIBRARY_PATH="$WX_PATH" \
+		LD_LIBRARY_PATH="$(SITE_PACKAGES)/wx" \
 		pyinstaller \
 			\
 			`# pyinstaller misses these two` \