Skip to content

Commit

Permalink
Version 1.08 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYsLab authored and MrYsLab committed Nov 27, 2017
1 parent 62f91df commit d33c333
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions s2m/s2m.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,19 @@ def find_base_path(self):
# get all the paths
path = sys.path

# get the prefix
prefix = sys.prefix
for p in path:
# make sure the prefix is in the path to avoid false positives
if prefix in p:
if not sys.platform.startswith('darwin'):
# get the prefix
prefix = sys.prefix
for p in path:
# make sure the prefix is in the path to avoid false positives
if prefix in p:
# look for the configuration directory
s_path = p + '/s2m'
if os.path.isdir(s_path):
# found it, set the base path
self.base_path = p + '/s2m'
else:
for p in path:
# look for the configuration directory
s_path = p + '/s2m'
if os.path.isdir(s_path):
Expand All @@ -253,6 +261,8 @@ def auto_load_scratch(self):
if self.scratch_executable == 'default':
if sys.platform.startswith('win32'):
self.scratch_executable = "C:/Program Files (x86)/Scratch 2/Scratch 2.exe"
elif sys.platform.startswith('darwin'):
self.scratch_executable = "/Applications/Scratch\ 2.app/Contents/MacOS/Scratch\ 2"
else:
self.scratch_executable = "/opt/Scratch\ 2/bin/Scratch\ 2"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='s2m',
version='1.07',
version='1.08',
packages=['s2m'],
install_requires=['pyserial>=2.7',
'psutil'],
Expand Down

0 comments on commit d33c333

Please sign in to comment.