Skip to content

Commit

Permalink
Resolve issue #9: ImportError: No module named platformio.util
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Aug 5, 2014
1 parent 75c50ef commit 62ccafd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
9 changes: 7 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Release History
1.0.0 (?)
---------

0.6.0 (?)
---------

* Fixed an issue ``ImportError: No module named platformio.util`` (`issue #9 <https://github.com/ivankravets/platformio/issues/9>`_)

0.5.0 (2014-08-04)
------------------

Expand All @@ -15,8 +20,8 @@ Release History
with external library (Adafruit CC3000)
* Implemented ``platformio upgrade`` command and "auto-check" for the latest
version (`issue #8 <https://github.com/ivankravets/platformio/issues/8>`_)
* Fixed issue with "auto-reset" for Raspduino board (thanks `David Mills <https://github.com/g7uvw>`_ for testing)
* Fixed bug with nested libs building (thanks `Antonio Vanegas <https://github.com/hpsaturn>`_ for testing)
* Fixed an issue with "auto-reset" for Raspduino board
* Fixed a bug with nested libs building

0.4.0 (2014-07-31)
------------------
Expand Down
13 changes: 11 additions & 2 deletions platformio/builder/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Copyright (C) Ivan Kravets <[email protected]>
# See LICENSE for details.

try:
from platformio.util import get_home_dir
except ImportError:
import sys
for _path in sys.path:
if "platformio" in _path:
sys.path.insert(0, _path[:_path.rfind("platformio")-1])
break
from platformio.util import get_home_dir

from os.path import isdir, join

from SCons.Script import (DefaultEnvironment, Exit, SConscript,
SConscriptChdir, Variables)

from platformio.util import (get_home_dir, get_pioenvs_dir, get_project_dir,
get_source_dir)
from platformio.util import get_pioenvs_dir, get_project_dir, get_source_dir

# AllowSubstExceptions()

Expand Down

0 comments on commit 62ccafd

Please sign in to comment.