From ba7371556f0ac761a352e8c4e1a42f7dd1facd25 Mon Sep 17 00:00:00 2001
From: Michael Dryden <mdryden@chem.utoronto.ca>
Date: Wed, 14 May 2014 02:09:16 -0400
Subject: [PATCH] Changed build_windows.py to work outside of project
 directory.

---
 .gitignore                      | 3 +++
 dstatInterface/build_windows.py | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 916c1f1..35c3940 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
 Breakpoints_v2.xcbkptlist
 *.xcuserstate
 *.pyc
+*~
+/dstatInterface/dist/
+/dstatInterface/build/
\ No newline at end of file
diff --git a/dstatInterface/build_windows.py b/dstatInterface/build_windows.py
index 2f01a53..4d84391 100644
--- a/dstatInterface/build_windows.py
+++ b/dstatInterface/build_windows.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 __requires__ = 'PyInstaller==2.1'
 
-import PyInstaller.main as pyi
 
+import os, sys
+os.chdir(os.path.dirname(sys.argv[0]))
+
+import PyInstaller.main as pyi #For some reason, it gets the path here, so working dir must be set first
 pyi.run(['interface_test.spec'])
-- 
GitLab