[gnoduino] Bug 673781 - Force Gnoduino SDK installation



commit 5a319df648ee363e197685379237f721712eff45
Author: Lucian Langa <lucilanga gnome org>
Date:   Wed Apr 18 01:09:59 2012 +0200

    Bug 673781 - Force Gnoduino SDK installation

 setup.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/setup.py b/setup.py
index 0a74d8e..d9c583d 100644
--- a/setup.py
+++ b/setup.py
@@ -28,6 +28,14 @@ from distutils import cmd
 import distutils.command
 from distutils.command.install import install as _install
 
+global forcesdk
+forcesdk = False
+
+for arg in sys.argv[1:]:
+	if arg == 'forcesdk': forcesdk = True
+try: sys.argv.remove('forcesdk')
+except: pass
+
 try:
     from DistUtilsExtra.command import *
     has_extras = True
@@ -113,7 +121,7 @@ def get_data_files():
     ]
     for subdir in ("hardware", "libraries", "reference"):
         # We ship hardware/libraries/reference modules if not already installed
-        if not os.path.exists(os.path.join(sys.prefix, "share", "arduino", subdir)):
+        if forcesdk is True or not os.path.exists(os.path.join(sys.prefix, "share", "arduino", subdir)):
             for dirpath, dirnames, filenames in os.walk(subdir):
                 if ".git" not in dirpath and filenames:
                     data_files.append([os.path.join("share", "gnoduino", dirpath),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]