forked from web2py/web2py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
103 lines (90 loc) · 3.86 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env python
import setuptools
from setuptools import setup
import tarfile
import os, sys
from setupbase import (
UpdateSubmodules,
check_submodule_status,
update_submodules,
require_clean_submodules
)
#-------------------------------------------------------------------------------
# Make sure we aren't trying to run without submodules
#-------------------------------------------------------------------------------
here = os.path.abspath(os.path.dirname(__file__))
require_clean_submodules(here, sys.argv)
from gluon.fileutils import tar, untar, read_file, write_file
def tar(file, filelist, expression='^.+$'):
"""
tars dir/files into file, only tars file that match expression
"""
tar = tarfile.TarFile(file, 'w')
try:
for element in filelist:
try:
for file in listdir(element, expression, add_dirs=True):
tar.add(os.path.join(element, file), file, False)
except:
tar.add(element)
finally:
tar.close()
def start():
if 'sdist' in sys.argv:
tar('gluon/env.tar', ['applications', 'VERSION',
'extras/icons/splashlogo.gif'])
setup(name='web2py',
version=read_file("VERSION").split()[1],
description="""full-stack framework for rapid development and prototyping
of secure database-driven web-based applications, written and
programmable in Python.""",
long_description="""
Everything in one package with no dependencies. Development, deployment,
debugging, testing, database administration and maintenance of applications can
be done via the provided web interface. web2py has no configuration files,
requires no installation, can run off a USB drive. web2py uses Python for the
Model, the Views and the Controllers, has a built-in ticketing system to manage
errors, an internationalization engine, works with SQLite, PostgreSQL, MySQL,
MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, sybase and Google App Engine via a
Database Abstraction Layer. web2py includes libraries to handle
HTML/XML, RSS, ATOM, CSV, RTF, JSON, AJAX, XMLRPC, WIKI markup. Production
ready, capable of upload/download streaming of very large files, and always
backward compatible.
""",
author='Massimo Di Pierro',
author_email='[email protected]',
license='http://web2py.com/examples/default/license',
classifiers=["Development Status :: 5 - Production/Stable"],
url='http://web2py.com',
platforms='Windows, Linux, Mac, Unix,Windows Mobile',
packages=['gluon',
'gluon/contrib',
'gluon/contrib/gateways',
'gluon/contrib/login_methods',
'gluon/contrib/markdown',
'gluon/contrib/markmin',
'gluon/contrib/memcache',
'gluon/contrib/fpdf',
'gluon/contrib/pymysql',
'gluon/contrib/pyrtf',
'gluon/contrib/pysimplesoap',
'gluon/contrib/plural_rules',
'gluon/contrib/minify',
'gluon/contrib/pyaes',
'gluon/contrib/pyuca',
'gluon/tests',
] + setuptools.find_packages(),
package_data={'gluon': ['env.tar']},
cmdclass={'submodule': UpdateSubmodules},
# scripts=['w2p_apps', 'w2p_run', 'w2p_clone'],
)
if __name__ == '__main__':
#print "web2py does not require installation and"
#print "you should just start it with:"
#print
#print "$ python web2py.py"
#print
#print "are you sure you want to install it anyway (y/n)?"
#s = raw_input('>')
#if s.lower()[:1]=='y':
start()