Skip to content

Commit

Permalink
various small fixes, environment.py still does not behave nicely on m…
Browse files Browse the repository at this point in the history
…ake install.
  • Loading branch information
amoose136 committed Jan 18, 2019
1 parent e587b0a commit 6c496ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

DESTDIR=/
PREFIX=/usr/local
PREFIX=/usr

all:
@# do nothing yet
Expand Down
2 changes: 1 addition & 1 deletion ino/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def recursive_inc_lib_flags(self, libdirs):
flags = SpaceList()
for d in libdirs:
flags.append('-I' + d)
flags.extend('-I' + subd for subd in list_subdirs(d, recursive=True, exclude=['examples']))
flags.extend('-I' + subd for subd in list_subdirs(d, recursive=False, exclude=['examples']))

This comment has been minimized.

Copy link
@amoose136

amoose136 Jan 18, 2019

Author Owner

As @josh-kaplan mentioned on issue amperka#251

return flags

def _scan_dependencies(self, dir, lib_dirs, inc_flags):
Expand Down
12 changes: 9 additions & 3 deletions ino/environment.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8; -*-

from __future__ import print_function

This comment has been minimized.

Copy link
@amoose136

amoose136 Jan 18, 2019

Author Owner

In case of using python 2 still

import argparse
from collections import OrderedDict
from collections import namedtuple
Expand Down Expand Up @@ -78,6 +78,12 @@ class Environment(dict):
arduino_dist_dir_guesses.insert(0, '/cygdrive/c/Progra~2/Arduino')
arduino_dist_dir_guesses.insert(0, '/cygdrive/c/Progra~3/Arduino')
arduino_dist_dir_guesses.insert(0, '/cygdrive/c/Progra~4/Arduino')
elif platform.system().startswith('MSYS_NT'):

This comment has been minimized.

Copy link
@amoose136

amoose136 Jan 18, 2019

Author Owner

Added so Msys can find the arduino path

arduino_dist_dir_guesses.insert(0, '/c/Progra~1/Arduino')
arduino_dist_dir_guesses.insert(0, '/c/Progra~2/Arduino')
arduino_dist_dir_guesses.insert(0, '/c/Progra~3/Arduino')
arduino_dist_dir_guesses.insert(0, '/c/Progra~4/Arduino')
# arduino_dist_dir_guesses.insert(0, '/c/Program Files/Arduino')
elif platform.system() == 'Windows':
arduino_dist_dir_guesses.insert(0, 'c:\\Arduino')
arduino_dist_dir_guesses.insert(0, 'c:\\Progra~1\\Arduino')
Expand Down Expand Up @@ -152,7 +158,7 @@ def _find(self, key, items, places, human_name, join, multi):
if key in self:
return self[key]

human_name = human_name or key
human_name = human_name or key or 'Null'

This comment has been minimized.

Copy link
@amoose136

amoose136 Jan 18, 2019

Author Owner

Probably not needed but I was getting some squirreliness around here and I'm trying to get the print function on 172 to stop complaining during make install


# make sure search on current directy first
#places.insert(0,'.')
Expand All @@ -162,7 +168,7 @@ def _find(self, key, items, places, human_name, join, multi):
places = map(os.path.expanduser, places)

glob_places = itertools.chain.from_iterable(glob(os.path.abspath(p)) for p in places)

print('Searching for', human_name, '...', end='')
test_func = os.path.isfile if join else os.path.exists
results = []
Expand Down

0 comments on commit 6c496ee

Please sign in to comment.