From e4d842cd5c1b66e43687f269adae4e4a4dcbaad7 Mon Sep 17 00:00:00 2001 From: Arturo FilastoĢ€ Date: Fri, 19 Aug 2011 15:20:57 +0200 Subject: Fix setup.py installation script --- packages/torouter-web/setup.py | 5 +++-- packages/torouter-web/src/config.py | 17 ----------------- packages/torouter-web/src/runui.py | 2 +- packages/torouter-web/src/tui/controllers/main.py | 5 +++-- packages/torouter-web/src/tui/controllers/network.py | 5 +++-- packages/torouter-web/src/tui/controllers/tor.py | 5 +++-- packages/torouter-web/src/tui/models/router_config.py | 2 +- packages/torouter-web/src/tui/utils/configuration.py | 2 +- packages/torouter-web/src/tui/utils/session.py | 2 +- packages/torouter-web/src/view.py | 11 ----------- 10 files changed, 16 insertions(+), 40 deletions(-) delete mode 100644 packages/torouter-web/src/config.py delete mode 100644 packages/torouter-web/src/view.py diff --git a/packages/torouter-web/setup.py b/packages/torouter-web/setup.py index 7629b6b..2ff99fa 100644 --- a/packages/torouter-web/setup.py +++ b/packages/torouter-web/setup.py @@ -2,7 +2,8 @@ from distutils.core import setup setup(name='torouter-tui', - packages=['tui'], + packages=['tui', 'tui.controllers', + 'tui.models', 'tui.utils'], package_dir = {'tui': 'src/tui/'}, package_data = {'tui': ['src/tui/']}, data_files = [('/usr/share/torouter-tui/static', @@ -12,5 +13,5 @@ setup(name='torouter-tui', author='Arturo Filasto', author_email='hellais@torproject.org', url='https://www.torproject.org/', - scripts=['src/runui.py', 'src/view.py', 'src/config.py']) + scripts=['src/runui.py', 'src/tui/view.py', 'src/tui/config.py']) diff --git a/packages/torouter-web/src/config.py b/packages/torouter-web/src/config.py deleted file mode 100644 index f3f8dcc..0000000 --- a/packages/torouter-web/src/config.py +++ /dev/null @@ -1,17 +0,0 @@ -# tui, Tor web UI -# by Arturo Filasto' -# - -import web, os - -cache = False - -globals = {} - -# Add your own (username, password) pair -authinfo = ("test", "test") - -interfaces_file = os.getcwd() + "/../../torouter-prep/configs/interfaces" -#torrc_file = os.getcwd() + "/../../torouter-prep/configs/torrc" -torrc_file = "/tmp/torrc" - diff --git a/packages/torouter-web/src/runui.py b/packages/torouter-web/src/runui.py index 80836b3..da1960a 100644 --- a/packages/torouter-web/src/runui.py +++ b/packages/torouter-web/src/runui.py @@ -3,7 +3,7 @@ # import web -import config +from tui import config import tui.controllers from tui.utils import session diff --git a/packages/torouter-web/src/tui/controllers/main.py b/packages/torouter-web/src/tui/controllers/main.py index 060caa6..fb925d3 100644 --- a/packages/torouter-web/src/tui/controllers/main.py +++ b/packages/torouter-web/src/tui/controllers/main.py @@ -1,6 +1,7 @@ import web -import view, config -from view import render +from tui import config +from tui import view +from tui.view import render from tui.utils import session """ diff --git a/packages/torouter-web/src/tui/controllers/network.py b/packages/torouter-web/src/tui/controllers/network.py index cc46643..bf48f54 100644 --- a/packages/torouter-web/src/tui/controllers/network.py +++ b/packages/torouter-web/src/tui/controllers/network.py @@ -1,6 +1,7 @@ import web -import view, config -from view import render +from tui import config +from tui import view +from tui.view import render from tui.utils import session,configuration,parsing """ diff --git a/packages/torouter-web/src/tui/controllers/tor.py b/packages/torouter-web/src/tui/controllers/tor.py index eaa587d..bc66623 100644 --- a/packages/torouter-web/src/tui/controllers/tor.py +++ b/packages/torouter-web/src/tui/controllers/tor.py @@ -1,6 +1,7 @@ import web -import view, config -from view import render +from tui import config +from tui import view +from tui.view import render from tui.utils import session, parsing, fileio """ diff --git a/packages/torouter-web/src/tui/models/router_config.py b/packages/torouter-web/src/tui/models/router_config.py index e83f9aa..a9bd975 100644 --- a/packages/torouter-web/src/tui/models/router_config.py +++ b/packages/torouter-web/src/tui/models/router_config.py @@ -1,5 +1,5 @@ import web -from config import db +from tui.config import db def new_config(conf): db.insert('router_config', diff --git a/packages/torouter-web/src/tui/utils/configuration.py b/packages/torouter-web/src/tui/utils/configuration.py index ba3d251..7133443 100644 --- a/packages/torouter-web/src/tui/utils/configuration.py +++ b/packages/torouter-web/src/tui/utils/configuration.py @@ -1,5 +1,5 @@ import web -import config +from tui import config def get(name): conf = {} diff --git a/packages/torouter-web/src/tui/utils/session.py b/packages/torouter-web/src/tui/utils/session.py index a554dad..4570196 100644 --- a/packages/torouter-web/src/tui/utils/session.py +++ b/packages/torouter-web/src/tui/utils/session.py @@ -1,5 +1,5 @@ import web -import config +from tui import config # The main session class diff --git a/packages/torouter-web/src/view.py b/packages/torouter-web/src/view.py deleted file mode 100644 index f4c9b39..0000000 --- a/packages/torouter-web/src/view.py +++ /dev/null @@ -1,11 +0,0 @@ -import web -import config - -t_globals = dict( - datestr=web.datestr, - ) - -# create the render object -render = web.template.render('tui/views', cache=config.cache, globals=t_globals) -render._keywords['globals']['render'] = render - -- cgit v1.2.3