Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 117 lines (109 sloc) 4.032 kB
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 from distutils.core import setup
5 import sys, os
6
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
7 # Globals
8 POSIX = 'posix' in sys.builtin_module_names
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
9 version = '0.9'
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
10 # Some paths we can reference
11 setup_dir = os.path.dirname(os.path.abspath(__file__))
12 static_dir = os.path.join('gateone', 'static')
13 plugins_dir = os.path.join('gateone', 'plugins')
14 templates_dir = os.path.join('gateone', 'templates')
15 docs_dir = os.path.join('gateone', 'docs')
16 tests_dir = os.path.join('gateone', 'tests')
17 i18n_dir = os.path.join('gateone', 'i18n')
18
19 if POSIX:
20 prefix = '/opt'
21 else:
22 prefix = os.environ['PROGRAMFILES']
23 print("Gate One will be installed in %s" % prefix)
24
e0e23fa @liftoff terminal.py: Ampersands are now converted into HTML entities (&)…
authored
25 for arg in sys.argv:
26 if arg.startswith('--prefix') or arg.startswith('--home'):
27 prefix = arg.split('=')[1]
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
28
e0e23fa @liftoff terminal.py: Ampersands are now converted into HTML entities (&)…
authored
29 def walk_data_files(path, install_path=prefix):
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
30 """
31 Walks *path* and returns a list suitable for use in data_files.
32 *install_path* will be used as the base installation path of the output.
33
34 NOTE: Ignores .git directories.
35 """
36 out = []
37 for (dirpath, dirs, filenames) in os.walk(path):
38 if ".git" in dirs:
39 del dirs[dirs.index(".git")]
40 thesefiles = []
41 final_path = os.path.join(install_path, dirpath)
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
42 #print("final path: %s" % final_path)
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
43 for fname in filenames:
44 file_path = os.path.join(dirpath, fname)
45 thesefiles.append(file_path)
46 out.append((final_path, thesefiles))
47 return out
48
49 # Take care of our data files
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
50 # Yes, we're treating Python files as data files. Why bother? Because users are
51 # familiar with the setup.py method *and* it can create .rpm files for us (among
52 # other things). Gate One is not a module, after all.
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
53 gateone_files=[ # Start with the basics...
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
54 (os.path.join(prefix, 'gateone'), [
55 os.path.join('gateone', 'auth.py'),
56 os.path.join('gateone', 'gateone.py'),
57 os.path.join('gateone', 'logviewer.py'),
58 os.path.join('gateone', 'sso.py'),
59 os.path.join('gateone', 'terminal.py'),
60 os.path.join('gateone', 'termio.py'),
61 os.path.join('gateone', 'utils.py'),
62 os.path.join('gateone', 'authpam.py'),
2660632 @liftoff Added internationalization (i18n) support. I'm using pybabel to gene…
authored
63 'README.rst',
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
64 'LICENSE.txt',
2660632 @liftoff Added internationalization (i18n) support. I'm using pybabel to gene…
authored
65 'babel_gateone.cfg'
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
66 ])
67 ]
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
68 static_files = walk_data_files(static_dir)
69 template_files = walk_data_files(templates_dir)
70 docs_files = walk_data_files(docs_dir)
71 plugin_files = walk_data_files(plugins_dir)
72 test_files = walk_data_files(tests_dir)
73 i18n_files = walk_data_files(i18n_dir)
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
74 # Put it all together
75 data_files = (
76 gateone_files +
77 static_files +
78 template_files +
79 docs_files +
80 plugin_files +
2660632 @liftoff Added internationalization (i18n) support. I'm using pybabel to gene…
authored
81 test_files +
82 i18n_files
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
83 )
84
85 setup(
86 name = 'gateone',
87 license = 'AGPLv3 or Proprietary',
88 version = version,
89 description = 'Web-based Terminal Emulator and SSH Client',
90 long_description = (
91 'Gate One is a web-based terminal emulator and SSH client with many '
92 'unique and advanced features.'),
93 classifiers = [
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
94 "Development Status : 4 - Beta",
95 "Operating System :: Unix",
96 "Environment :: Console",
97 "Environment :: Web Environment",
98 "Intended Audience :: End Users/Desktop",
99 "Intended Audience :: Developers",
100 "Intended Audience :: System Administrators",
101 # NOTE: Wish there was a "Tornado" framework option
102 "Programming Language :: Python :: 2.6",
103 "License :: OSI Approved :: GNU Affero General Public License v3",
104 "License :: Other/Proprietary License",
105 "Topic :: Internet :: WWW/HTTP",
106 "Topic :: Terminals"
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
107 ], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
108 keywords = (
109 'web administration terminal vt100 xterm emulation html5 console '
110 'web-to-host'),
111 url = "http:/liftoffsoftware.com/Products/GateOne",
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
112 author = 'Dan McDougall',
113 author_email = 'daniel.mcdougall@liftoffsoftware.com',
fe1287b @liftoff TORNADO 2.2 IS OUT. This version is now required to use Gate One as …
authored
114 requires=["tornado (>=2.2)"],
04f2eab @liftoff Commit #1: The Gate One beta is about to go public.
authored
115 provides = ['gateone'],
116 data_files = data_files,
117 )
Something went wrong with that request. Please try again.