From 920af10c47c9d36d7bcf240b418bad8b33fc8b1a Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 18 Aug 2010 15:09:07 +0000 Subject: detect -no-sugar situation --- diff --git a/setup.py b/setup.py index efa2159..e5026ee 100755..100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ #!/usr/bin/env python import os +import sys -if 'SUGAR_ACTIVITY_ROOT' in os.environ: - from sugar.activity import bundlebuilder - - if __name__ == "__main__": - bundlebuilder.start() -else: +if len(sys.argv) > 1 and '--no-sugar' == sys.argv[1]: + # Remove the argument from the stack so we don't cause problems + # for distutils + sys.argv.pop(1) + import glob, os.path, string from distutils.core import setup - + DATA_FILES = [ ('icons', glob.glob('icons/*')), ('images', glob.glob('images/*')), @@ -25,3 +25,8 @@ else: scripts = ['turtleart'], data_files = DATA_FILES, ) +else: + from sugar.activity import bundlebuilder + + if __name__ == "__main__": + bundlebuilder.start() -- cgit v0.9.1