summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2012-11-06 22:21:00 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2012-11-06 22:21:00 +0000
commitd9f1210fe7161395c877d1a6ef4ff78e03420c90 (patch)
treec287b3cd3d4acf50f04e0ad81ccbe5e76e9a81b9
parent0a9fe242e762a3da9989865ed649ac9fb43aa9e9 (diff)
downloaddeluge-d9f1210f.zip
deluge-d9f1210f.tar.gz
deluge-d9f1210f.tar.bz2
Fix 2107 : create_plugin.py call correct version of python
-rw-r--r--deluge/scripts/create_plugin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/deluge/scripts/create_plugin.py b/deluge/scripts/create_plugin.py
index d195fbc..a0d5a66 100644
--- a/deluge/scripts/create_plugin.py
+++ b/deluge/scripts/create_plugin.py
@@ -9,6 +9,7 @@ python create_plugin.py --name MyPlugin2 --basepath . --author-name "Your Name"
from optparse import OptionParser
import os
+import sys
import deluge.common
parser = OptionParser()
parser.add_option("-n", "--name", dest="name",help="plugin name")
@@ -51,6 +52,7 @@ def create_plugin():
plugin_base = os.path.realpath(os.path.join(options.path, safe_name))
src = os.path.join(plugin_base, safe_name)
data_dir = os.path.join(src, "data")
+ python_path = sys.executable
if os.path.exists(plugin_base):
print "the directory %s already exists, delete it first" % plugin_base
@@ -63,6 +65,7 @@ def create_plugin():
"safe_name":safe_name,
"filename":filename,
"plugin_base":plugin_base,
+ "python_path":python_path,
"url": options.url,
"configdir": options.configdir
}
@@ -380,7 +383,7 @@ CREATE_DEV_LINK = """#!/bin/bash
cd %(plugin_base)s
mkdir temp
export PYTHONPATH=./temp
-python setup.py build develop --install-dir ./temp
+%(python_path)s setup.py build develop --install-dir ./temp
cp ./temp/%(name)s.egg-link %(configdir)s/plugins
rm -fr ./temp
"""