Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaurent-bernabe <laurent.bernabe@gmail.com>2012-11-09 11:22:04 (GMT)
committer laurent-bernabe <laurent.bernabe@gmail.com>2012-11-09 11:22:04 (GMT)
commite0d936a798a9141f00fb5a44b97756e489626e39 (patch)
tree43ef923d223ee003a94710c07f4314409f62972a
parent6c58ef0c803e311b492f202cbf49806fd381b4b8 (diff)
This time I am using the advanced version of setup.py sugar script.
Allowing me to package activity directly from my host os.
-rwxr-xr-xsetup.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 983eb4d..26a311b 100755
--- a/setup.py
+++ b/setup.py
@@ -15,5 +15,14 @@
#You should have received a copy of the GNU General Public License
#along with LearningWriting. If not, see <http://www.gnu.org/licenses/>.
-from sugar.activity import bundlebuilder
-bundlebuilder.start() \ No newline at end of file
+try:
+ from sugar.activity import bundlebuilder
+ bundlebuilder.start()
+except ImportError:
+ import os
+ os.system("find ./ | sed 's,^./,HelloWorldActivity.activity/,g' > MANIFEST")
+ os.system('rm HelloWorldActivity.xo')
+ os.chdir('..')
+ os.system('zip -r HelloWorldActivity.xo HelloWorldActivity.activity')
+ os.system('mv HelloWorldActivity.xo ./HelloWorldActivity.activity')
+ os.chdir('HelloWorldActivity.activity') \ No newline at end of file