summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauren Perry <lauren.perry@codethink.co.uk>2014-12-11 16:36:04 +0000
committerLauren Perry <lauren.perry@codethink.co.uk>2014-12-11 17:02:32 +0000
commit8318e4dbd5d1a88b10b2dfdf1aeb8d9bdc21a180 (patch)
tree79cf16bed8b092e410c97f81e35a66383b137d45
parent8a2aed17cdaaf2ba20cd9f12f21f703475564406 (diff)
downloadfirehose-8318e4dbd5d1a88b10b2dfdf1aeb8d9bdc21a180.tar.gz
Add tools for installing Firehose
-rwxr-xr-xfirehose.sh21
-rw-r--r--firehose/plugin/firehose_plugin.py (renamed from plugin/firehose_plugin.py)0
-rw-r--r--setup.py16
3 files changed, 37 insertions, 0 deletions
diff --git a/firehose.sh b/firehose.sh
new file mode 100755
index 0000000..4d272d3
--- /dev/null
+++ b/firehose.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+MORPH="${MORPH:-$(which morph)}"
+
+BASE="$(dirname $0)"
+BASE="${BASE:-.}"
+BASE="$(realpath ${BASE})"
+
+# Currently the only way to get this to work is to hardcode the path of the plugin.
+# Obviously this is not ideal, but until a working method is obtained this remains
+# our best option at present.
+
+MORPH_PLUGIN_PATH="/usr/lib/python2.7/site-packages/firehose-0.1-py2.7.egg/firehose/plugin"
+
+export MORPH_PLUGIN_PATH
+
+PYTHONPATH="${BASE}${PYTHONPATH:+:${PYTHONPATH}}:"
+
+export PYTHONPATH
+
+exec ${MORPH} firehose "$@"
diff --git a/plugin/firehose_plugin.py b/firehose/plugin/firehose_plugin.py
index 25e2eb4..25e2eb4 100644
--- a/plugin/firehose_plugin.py
+++ b/firehose/plugin/firehose_plugin.py
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..17e4f26
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,16 @@
+from setuptools import setup
+setup(
+ name = "firehose",
+ version = "0.1",
+ packages = ["firehose"],
+ package_data={
+ "firehose":
+ ["plugin/*.py"]
+ },
+ scripts = [
+ "firehose.sh"
+ ],
+ # This is because morph won't find it as a plugin if it is
+ # installed as a .egg file
+ zip_safe = False
+)