Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2008-03-30 21:03:39 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2008-03-30 21:03:39 (GMT)
commitd959426744cd19fb5f7eb9ec2c9e41d91b2d5652 (patch)
tree6e311b3e3caf310762f080506d2eb0807f0c728f /sugar
parent9e9bed7ca8133cd76ed869af6f8bd6c57f5dd861 (diff)
Make install take the full path rather than prefix. That way
it can be used to install in ~/Activities.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/bundlebuilder.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/sugar/activity/bundlebuilder.py b/sugar/activity/bundlebuilder.py
index e992557..7ff2b0b 100644
--- a/sugar/activity/bundlebuilder.py
+++ b/sugar/activity/bundlebuilder.py
@@ -94,9 +94,6 @@ def _get_bundle_dir():
bundle_name = os.path.basename(_get_source_path())
return bundle_name + '.activity'
-def _get_install_dir(prefix):
- return os.path.join(prefix, 'share/activities')
-
def _get_package_name(bundle_name):
bundle = ActivityBundle(_get_source_path())
zipname = '%s-%d.xo' % (bundle_name, bundle.get_activity_version())
@@ -192,15 +189,14 @@ def cmd_dist(bundle_name, manifest):
bundle_zip.close()
-def cmd_install(bundle_name, manifest, prefix):
+def cmd_install(bundle_name, manifest, path):
cmd_dist(bundle_name, manifest)
- cmd_uninstall(prefix)
+ cmd_uninstall(path)
- _extract_bundle(_get_package_name(bundle_name),
- _get_install_dir(prefix))
+ _extract_bundle(_get_package_name(bundle_name), path)
-def cmd_uninstall(prefix):
- path = os.path.join(_get_install_dir(prefix), _get_bundle_dir())
+def cmd_uninstall(path):
+ path = os.path.join(path, _get_bundle_dir())
if os.path.isdir(path):
shutil.rmtree(path)