diff --git a/static/scripts/message.js b/abp/static/__init__.py similarity index 100% rename from static/scripts/message.js rename to abp/static/__init__.py diff --git a/static/img/ball.png b/abp/static/img/ball.png similarity index 100% rename from static/img/ball.png rename to abp/static/img/ball.png diff --git a/static/img/ball.svg b/abp/static/img/ball.svg similarity index 100% rename from static/img/ball.svg rename to abp/static/img/ball.svg diff --git a/static/img/make_figs.sh b/abp/static/img/make_figs.sh similarity index 100% rename from static/img/make_figs.sh rename to abp/static/img/make_figs.sh diff --git a/static/img/tip.png b/abp/static/img/tip.png similarity index 100% rename from static/img/tip.png rename to abp/static/img/tip.png diff --git a/static/img/tip.svg b/abp/static/img/tip.svg similarity index 100% rename from static/img/tip.svg rename to abp/static/img/tip.svg diff --git a/static/index.html b/abp/static/index.html similarity index 100% rename from static/index.html rename to abp/static/index.html diff --git a/static/main.css b/abp/static/main.css similarity index 100% rename from static/main.css rename to abp/static/main.css diff --git a/static/scripts/.gitignore b/abp/static/scripts/.gitignore similarity index 100% rename from static/scripts/.gitignore rename to abp/static/scripts/.gitignore diff --git a/static/scripts/anders_briegel.js b/abp/static/scripts/anders_briegel.js similarity index 100% rename from static/scripts/anders_briegel.js rename to abp/static/scripts/anders_briegel.js diff --git a/static/scripts/editor.js b/abp/static/scripts/editor.js similarity index 100% rename from static/scripts/editor.js rename to abp/static/scripts/editor.js diff --git a/static/scripts/graph.js b/abp/static/scripts/graph.js similarity index 100% rename from static/scripts/graph.js rename to abp/static/scripts/graph.js diff --git a/static/scripts/gui.js b/abp/static/scripts/gui.js similarity index 100% rename from static/scripts/gui.js rename to abp/static/scripts/gui.js diff --git a/static/scripts/interaction.js b/abp/static/scripts/interaction.js similarity index 100% rename from static/scripts/interaction.js rename to abp/static/scripts/interaction.js diff --git a/static/scripts/main.js b/abp/static/scripts/main.js similarity index 100% rename from static/scripts/main.js rename to abp/static/scripts/main.js diff --git a/static/scripts/materials.js b/abp/static/scripts/materials.js similarity index 100% rename from static/scripts/materials.js rename to abp/static/scripts/materials.js diff --git a/abp/static/scripts/message.js b/abp/static/scripts/message.js new file mode 100644 index 0000000..e69de29 diff --git a/static/scripts/mouse.js b/abp/static/scripts/mouse.js similarity index 100% rename from static/scripts/mouse.js rename to abp/static/scripts/mouse.js diff --git a/static/scripts/orbitcontrols.js b/abp/static/scripts/orbitcontrols.js similarity index 100% rename from static/scripts/orbitcontrols.js rename to abp/static/scripts/orbitcontrols.js diff --git a/static/scripts/tables.js b/abp/static/scripts/tables.js similarity index 100% rename from static/scripts/tables.js rename to abp/static/scripts/tables.js diff --git a/static/scripts/tests.js b/abp/static/scripts/tests.js similarity index 100% rename from static/scripts/tests.js rename to abp/static/scripts/tests.js diff --git a/static/scripts/three.js b/abp/static/scripts/three.js similarity index 100% rename from static/scripts/three.js rename to abp/static/scripts/three.js diff --git a/static/scripts/websocket.js b/abp/static/scripts/websocket.js similarity index 100% rename from static/scripts/websocket.js rename to abp/static/scripts/websocket.js diff --git a/static/test.html b/abp/static/test.html similarity index 100% rename from static/test.html rename to abp/static/test.html diff --git a/bin/abpserver b/bin/abpserver index bb016d7..902cc20 100755 --- a/bin/abpserver +++ b/bin/abpserver @@ -7,6 +7,7 @@ import os, sys, threading import webbrowser import argparse import abp +from pkg_resources import resource_filename clients = [] @@ -32,7 +33,7 @@ if __name__ == '__main__': args = parser.parse_args() # Change to the right working dir - where = os.path.join(os.path.dirname(abp.__path__[0]), "static") + where = os.path.abspath(resource_filename("abp.static", "")) os.chdir(where) # Start the HTTP server diff --git a/setup.py b/setup.py index 084b1b2..12d7fb2 100755 --- a/setup.py +++ b/setup.py @@ -2,14 +2,11 @@ from setuptools import setup, find_packages from glob import glob from os import path -APPNAME = "abp" STATIC = glob("static/*.*")+glob("static/img/*.*")+glob("static/scripts/*.*") -appdata = path.expanduser(path.join("~", "." + APPNAME)) -print appdata setup( name = "abp", - version = "0.4", + version = "0.4.1", packages = find_packages(), test_suite = "tests", author = "Pete Shadbolt", @@ -20,5 +17,5 @@ setup( setup_requires = ["numpy"], scripts = ["bin/abpserver"], install_requires = ["numpy", "networkx", "tqdm", "websocket-client", "websocket-server"], - data_files = [("static", STATIC)] + package_data = {"abp.static": STATIC} ) diff --git a/static/scripts/.agignore b/static/scripts/.agignore deleted file mode 100644 index 377db0e..0000000 --- a/static/scripts/.agignore +++ /dev/null @@ -1,2 +0,0 @@ -three.js -orbitcontrols.js