Merge pull request #535 from niphlod/fix/binaries_switch
fix binaries build. thanks @David Ripplinger
This commit is contained in:
@@ -5,10 +5,10 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import optparse
|
import optparse
|
||||||
|
|
||||||
if '__file__' in globals():
|
if hasattr(sys, 'frozen'):
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
elif hasattr(sys, 'frozen'):
|
|
||||||
path = os.path.dirname(os.path.abspath(sys.executable))
|
path = os.path.dirname(os.path.abspath(sys.executable))
|
||||||
|
elif '__file__' in globals():
|
||||||
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
else:
|
else:
|
||||||
path = os.getcwd()
|
path = os.getcwd()
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if '__file__' in globals():
|
if hasattr(sys, 'frozen'):
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
elif hasattr(sys, 'frozen'):
|
|
||||||
path = os.path.dirname(os.path.abspath(sys.executable)) # for py2exe
|
path = os.path.dirname(os.path.abspath(sys.executable)) # for py2exe
|
||||||
|
elif '__file__' in globals():
|
||||||
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
else: # should never happen
|
else: # should never happen
|
||||||
path = os.getcwd()
|
path = os.getcwd()
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user