aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-03 20:10:48 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-29 20:26:58 +0200
commit435ccbfdf7e48cfd809c41049d9edf4d6c267566 (patch)
tree46160bbf0d3ddf540ab99578ee16c68e74f7a8f4
parentb1cb035373fc3b6888e3664ca0ca3f37a9c0e639 (diff)
Fixes for pyinstaller
-rwxr-xr-xgenerator/nanopb_generator.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index ab6f3cb5..6ccb96f9 100755
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -6,7 +6,14 @@ nanopb_version = "nanopb-0.2.5-dev"
import sys
try:
+ # Add some dummy imports to keep packaging tools happy.
import google, distutils.util # bbfreeze seems to need these
+ import pkg_resources # pyinstaller / protobuf 2.5 seem to need these
+except:
+ # Don't care, we will error out later if it is actually important.
+ pass
+
+try:
import google.protobuf.text_format as text_format
except:
sys.stderr.write('''