##// END OF EJS Templates
merged some docs, and fixed setup.py platform check
marcink -
r1227:2182a200 default
parent child Browse files
Show More
@@ -32,7 +32,7 b' threadpool_workers = 5'
32 threadpool_max_requests = 6
32 threadpool_max_requests = 6
33
33
34 ##option to use threads of process
34 ##option to use threads of process
35 use_threadpool = false
35 use_threadpool = true
36
36
37 use = egg:Paste#http
37 use = egg:Paste#http
38 host = 0.0.0.0
38 host = 0.0.0.0
@@ -45,6 +45,7 b' static_files = true'
45 lang=en
45 lang=en
46 cache_dir = %(here)s/data
46 cache_dir = %(here)s/data
47 index_dir = %(here)s/data/index
47 index_dir = %(here)s/data/index
48 app_instance_uuid = develop
48 cut_off_limit = 256000
49 cut_off_limit = 256000
49 force_https = false
50 force_https = false
50
51
@@ -70,7 +71,7 b' celery.result.serialier = json'
70 celeryd.concurrency = 2
71 celeryd.concurrency = 2
71 #celeryd.log.file = celeryd.log
72 #celeryd.log.file = celeryd.log
72 celeryd.log.level = debug
73 celeryd.log.level = debug
73 celeryd.max.tasks.per.child = 3
74 celeryd.max.tasks.per.child = 1
74
75
75 #tasks will never be sent to the queue, but executed locally instead.
76 #tasks will never be sent to the queue, but executed locally instead.
76 celery.always.eager = false
77 celery.always.eager = false
@@ -78,8 +79,9 b' celery.always.eager = false'
78 ####################################
79 ####################################
79 ### BEAKER CACHE ####
80 ### BEAKER CACHE ####
80 ####################################
81 ####################################
81 beaker.cache.data_dir=/%(here)s/data/cache/data
82 beaker.cache.data_dir=%(here)s/data/cache/data
82 beaker.cache.lock_dir=/%(here)s/data/cache/lock
83 beaker.cache.lock_dir=%(here)s/data/cache/lock
84
83 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
85 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
84
86
85 beaker.cache.super_short_term.type=memory
87 beaker.cache.super_short_term.type=memory
@@ -138,8 +140,8 b' logview.pylons.util = #eee'
138 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
140 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
139 #########################################################
141 #########################################################
140 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
142 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
141 #sqlalchemy.db1.echo = False
143 sqlalchemy.db1.echo = True
142 #sqlalchemy.db1.pool_recycle = 3600
144 sqlalchemy.db1.pool_recycle = 3600
143 sqlalchemy.convert_unicode = true
145 sqlalchemy.convert_unicode = true
144
146
145 ################################
147 ################################
@@ -149,10 +151,10 b' sqlalchemy.convert_unicode = true'
149 keys = root, routes, rhodecode, sqlalchemy,beaker,templates
151 keys = root, routes, rhodecode, sqlalchemy, beaker, templates
150
152
151 [handlers]
153 [handlers]
152 keys = console
154 keys = console, console_sql
153
155
154 [formatters]
156 [formatters]
155 keys = generic,color_formatter
157 keys = generic, color_formatter, color_formatter_sql
156
158
157 #############
159 #############
158 ## LOGGERS ##
160 ## LOGGERS ##
@@ -163,32 +165,32 b' handlers = console'
163
165
164 [logger_routes]
166 [logger_routes]
165 level = DEBUG
167 level = DEBUG
166 handlers = console
168 handlers =
167 qualname = routes.middleware
169 qualname = routes.middleware
168 # "level = DEBUG" logs the route matched and routing variables.
170 # "level = DEBUG" logs the route matched and routing variables.
169 propagate = 0
171 propagate = 1
170
172
171 [logger_beaker]
173 [logger_beaker]
172 level = ERROR
174 level = DEBUG
173 handlers = console
175 handlers =
174 qualname = beaker.container
176 qualname = beaker.container
175 propagate = 0
177 propagate = 1
176
178
177 [logger_templates]
179 [logger_templates]
178 level = INFO
180 level = INFO
179 handlers = console
181 handlers =
180 qualname = pylons.templating
182 qualname = pylons.templating
181 propagate = 0
183 propagate = 1
182
184
183 [logger_rhodecode]
185 [logger_rhodecode]
184 level = DEBUG
186 level = DEBUG
185 handlers = console
187 handlers =
186 qualname = rhodecode
188 qualname = rhodecode
187 propagate = 0
189 propagate = 1
188
190
189 [logger_sqlalchemy]
191 [logger_sqlalchemy]
190 level = ERROR
192 level = INFO
191 handlers = console
193 handlers = console_sql
192 qualname = sqlalchemy.engine
194 qualname = sqlalchemy.engine
193 propagate = 0
195 propagate = 0
194
196
@@ -202,6 +204,12 b' args = (sys.stderr,)'
202 level = NOTSET
204 level = NOTSET
203 formatter = color_formatter
205 formatter = color_formatter
204
206
207 [handler_console_sql]
208 class = StreamHandler
209 args = (sys.stderr,)
210 level = NOTSET
211 formatter = color_formatter_sql
212
205 ################
213 ################
206 ## FORMATTERS ##
214 ## FORMATTERS ##
207 ################
215 ################
@@ -213,4 +221,9 b' datefmt = %Y-%m-%d %H:%M:%S'
213 [formatter_color_formatter]
221 [formatter_color_formatter]
214 class=rhodecode.lib.colored_formatter.ColorFormatter
222 class=rhodecode.lib.colored_formatter.ColorFormatter
215 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
223 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
224 datefmt = %Y-%m-%d %H:%M:%S
225
226 [formatter_color_formatter_sql]
227 class=rhodecode.lib.colored_formatter.ColorFormatterSql
228 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
216 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
229 datefmt = %Y-%m-%d %H:%M:%S
@@ -53,5 +53,4 b' Other topics'
53 .. _git: http://git-scm.com/
53 .. _git: http://git-scm.com/
54 .. _celery: http://celeryproject.org/
54 .. _celery: http://celeryproject.org/
55 .. _Sphinx: http://sphinx.pocoo.org/
55 .. _Sphinx: http://sphinx.pocoo.org/
56 .. _GPL: http://www.gnu.org/licenses/gpl.html
56 .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file
57 .. _vcs: http://pypi.python.org/pypi/vcs
@@ -307,12 +307,11 b' http://wiki.pylonshq.com/display/pylonsc'
307 Apache as subdirectory
307 Apache as subdirectory
308 ----------------------
308 ----------------------
309
309
310
311 Apache subdirectory part::
310 Apache subdirectory part::
312
311
313 <Location /rhodecode>
312 <Location /<someprefix> >
314 ProxyPass http://127.0.0.1:59542/rhodecode
313 ProxyPass http://127.0.0.1:5000/<someprefix>
315 ProxyPassReverse http://127.0.0.1:59542/rhodecode
314 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
316 SetEnvIf X-Url-Scheme https HTTPS=1
315 SetEnvIf X-Url-Scheme https HTTPS=1
317 </Location>
316 </Location>
318
317
@@ -327,6 +326,8 b' Add the following at the end of the .ini'
327 prefix = /<someprefix>
326 prefix = /<someprefix>
328
327
329
328
329 then change <someprefix> into your choosen prefix
330
330 Apache's example FCGI config
331 Apache's example FCGI config
331 ----------------------------
332 ----------------------------
332
333
@@ -15,7 +15,8 b' This file can also be run as a script to'
15 """
15 """
16 import sys
16 import sys
17 DEFAULT_VERSION = "0.6c9"
17 DEFAULT_VERSION = "0.6c9"
18 DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
18 DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" \
19 % sys.version[:3]
19
20
20 md5_data = {
21 md5_data = {
21 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
22 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
@@ -54,9 +55,13 b' md5_data = {'
54 'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',
55 'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',
55 }
56 }
56
57
57 import sys, os
58 import os
58 try: from hashlib import md5
59
59 except ImportError: from md5 import md5
60 try:
61 from hashlib import md5
62 except ImportError:
63 from md5 import md5
64
60
65
61 def _validate_md5(egg_name, data):
66 def _validate_md5(egg_name, data):
62 if egg_name in md5_data:
67 if egg_name in md5_data:
@@ -64,15 +69,13 b' def _validate_md5(egg_name, data):'
64 if digest != md5_data[egg_name]:
69 if digest != md5_data[egg_name]:
65 print >>sys.stderr, (
70 print >> sys.stderr, (
66 "md5 validation of %s failed! (Possible download problem?)"
71 "md5 validation of %s failed! (Possible download problem?)"
67 % egg_name
72 % egg_name)
68 )
69 sys.exit(2)
73 sys.exit(2)
70 return data
74 return data
71
75
72 def use_setuptools(
76
73 version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
77 def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
74 download_delay=15
78 to_dir=os.curdir, download_delay=15):
75 ):
76 """Automatically find/download setuptools and make it available on sys.path
79 """Automatically find/download setuptools and make it available on sys.path
77
80
78 `version` should be a valid setuptools version number that is available
81 `version` should be a valid setuptools version number that is available
@@ -84,25 +87,29 b' def use_setuptools('
84 this routine will print a message to ``sys.stderr`` and raise SystemExit in
87 this routine will print a message to ``sys.stderr`` and raise SystemExit in
85 an attempt to abort the calling script.
88 an attempt to abort the calling script.
86 """
89 """
87 was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules
90 was_imported = 'pkg_resources' in sys.modules or ('setuptools' in
91 sys.modules)
92
88 def do_download():
93 def do_download():
89 egg = download_setuptools(version, download_base, to_dir, download_delay)
94 egg = download_setuptools(version, download_base, to_dir,
95 download_delay)
90 sys.path.insert(0, egg)
96 sys.path.insert(0, egg)
91 import setuptools; setuptools.bootstrap_install_from = egg
97 import setuptools
98 setuptools.bootstrap_install_from = egg
92 try:
99 try:
93 import pkg_resources
100 import pkg_resources
94 except ImportError:
101 except ImportError:
95 return do_download()
102 return do_download()
96 try:
103 try:
97 pkg_resources.require("setuptools>="+version); return
104 pkg_resources.require("setuptools>=" + version)
105 return
98 except pkg_resources.VersionConflict, e:
106 except pkg_resources.VersionConflict, e:
99 if was_imported:
107 if was_imported:
100 print >>sys.stderr, (
108 print >> sys.stderr, (
101 "The required version of setuptools (>=%s) is not available, and\n"
109 "The required version of setuptools (>=%s) is not available, and\n"
102 "can't be installed while this script is running. Please install\n"
110 "can't be installed while this script is running. Please install\n"
103 " a more recent version first, using 'easy_install -U setuptools'."
111 " a more recent version first, using 'easy_install -U setuptools'."
104 "\n\n(Currently using %r)"
112 "\n\n(Currently using %r)") % (version, e.args[0])
105 ) % (version, e.args[0])
106 sys.exit(2)
113 sys.exit(2)
107 else:
114 else:
108 del pkg_resources, sys.modules['pkg_resources'] # reload ok
115 del pkg_resources, sys.modules['pkg_resources'] # reload ok
@@ -110,18 +117,19 b' def use_setuptools('
110 except pkg_resources.DistributionNotFound:
117 except pkg_resources.DistributionNotFound:
111 return do_download()
118 return do_download()
112
119
113 def download_setuptools(
120
114 version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
121 def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
115 delay = 15
122 to_dir=os.curdir, delay=15):
116 ):
117 """Download setuptools from a specified location and return its filename
123 """Download setuptools from a specified location and return its filename
118
124
119 `version` should be a valid setuptools version number that is available
125 `version` should be a valid setuptools version number that is available
120 as an egg for download under the `download_base` URL (which should end
126 as an egg for download under the `download_base` URL (which should end
121 with a '/'). `to_dir` is the directory where the egg will be downloaded.
127 with a '/'). `to_dir` is the directory where the egg will be downloaded.
122 `delay` is the number of seconds to pause before an actual download attempt.
128 `delay` is the number of seconds to pause before an actual download
129 attempt.
123 """
130 """
124 import urllib2, shutil
131 import urllib2
132
125 egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
133 egg_name = "setuptools-%s-py%s.egg" % (version, sys.version[:3])
126 url = download_base + egg_name
134 url = download_base + egg_name
127 saveto = os.path.join(to_dir, egg_name)
135 saveto = os.path.join(to_dir, egg_name)
@@ -144,54 +152,24 b' I will start the download in %d seconds.'
144
152
145 and place it in this directory before rerunning this script.)
153 and place it in this directory before rerunning this script.)
146 ---------------------------------------------------------------------------""",
154 ---------------------------------------------------------------------------""",
147 version, download_base, delay, url
155 version, download_base, delay, url)
148 ); from time import sleep; sleep(delay)
156 from time import sleep
157 sleep(delay)
149 log.warn("Downloading %s", url)
158 log.warn("Downloading %s", url)
150 src = urllib2.urlopen(url)
159 src = urllib2.urlopen(url)
151 # Read/write all in one block, so we don't create a corrupt file
160 # Read/write all in one block, so we don't create a corrupt file
152 # if the download is interrupted.
161 # if the download is interrupted.
153 data = _validate_md5(egg_name, src.read())
162 data = _validate_md5(egg_name, src.read())
154 dst = open(saveto,"wb"); dst.write(data)
163 dst = open(saveto, "wb")
164 dst.write(data)
155 finally:
165 finally:
156 if src: src.close()
166 if src:
157 if dst: dst.close()
167 src.close()
168 if dst:
169 dst.close()
158 return os.path.realpath(saveto)
170 return os.path.realpath(saveto)
159
171
160
172
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195 def main(argv, version=DEFAULT_VERSION):
173 def main(argv, version=DEFAULT_VERSION):
196 """Install or upgrade setuptools and EasyInstall"""
174 """Install or upgrade setuptools and EasyInstall"""
197 try:
175 try:
@@ -210,8 +188,8 b' def main(argv, version=DEFAULT_VERSION):'
210 if setuptools.__version__ == '0.0.1':
188 if setuptools.__version__ == '0.0.1':
211 print >>sys.stderr, (
189 print >> sys.stderr, (
212 "You have an obsolete version of setuptools installed. Please\n"
190 "You have an obsolete version of setuptools installed. Please\n"
213 "remove it from your system entirely before rerunning this script."
191 "remove it from your system entirely before rerunning"
214 )
192 " this script.")
215 sys.exit(2)
193 sys.exit(2)
216
194
217 req = "setuptools>="+version
195 req = "setuptools>=" + version
@@ -230,9 +208,11 b' def main(argv, version=DEFAULT_VERSION):'
230 from setuptools.command.easy_install import main
208 from setuptools.command.easy_install import main
231 main(argv)
209 main(argv)
232 else:
210 else:
233 print "Setuptools version",version,"or greater has been installed."
211 print "Setuptools version", version, ("or greater has "
212 "been installed.")
234 print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
213 print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
235
214
215
236 def update_md5(filenames):
216 def update_md5(filenames):
237 """Update our built-in md5 registry"""
217 """Update our built-in md5 registry"""
238
218
@@ -250,7 +230,9 b' def update_md5(filenames):'
250
230
251 import inspect
231 import inspect
252 srcfile = inspect.getsourcefile(sys.modules[__name__])
232 srcfile = inspect.getsourcefile(sys.modules[__name__])
253 f = open(srcfile, 'rb'); src = f.read(); f.close()
233 f = open(srcfile, 'rb')
234 src = f.read()
235 f.close()
254
236
255 match = re.search("\nmd5_data = {\n([^}]+)}", src)
237 match = re.search("\nmd5_data = {\n([^}]+)}", src)
256 if not match:
238 if not match:
@@ -268,9 +250,3 b" if __name__=='__main__':"
268 update_md5(sys.argv[2:])
250 update_md5(sys.argv[2:])
269 else:
251 else:
270 main(sys.argv[1:])
252 main(sys.argv[1:])
271
272
273
274
275
276
@@ -1,6 +1,6 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # rhodecode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
@@ -10,7 +10,7 b' debug = true'
10 ################################################################################
10 ################################################################################
11 ## Uncomment and replace with the address which should receive ##
11 ## Uncomment and replace with the address which should receive ##
12 ## any error reports after application crash ##
12 ## any error reports after application crash ##
13 ## Additionally those settings will be used by rhodecode mailing system ##
13 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ################################################################################
14 ################################################################################
15 #email_to = admin@localhost
15 #email_to = admin@localhost
16 #error_email_from = paste_error@localhost
16 #error_email_from = paste_error@localhost
@@ -78,8 +78,9 b' celery.always.eager = false'
78 ####################################
78 ####################################
79 ### BEAKER CACHE ####
79 ### BEAKER CACHE ####
80 ####################################
80 ####################################
81 beaker.cache.data_dir=/%(here)s/data/cache/data
81 beaker.cache.data_dir=%(here)s/data/cache/data
82 beaker.cache.lock_dir=/%(here)s/data/cache/lock
82 beaker.cache.lock_dir=%(here)s/data/cache/lock
83
83 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
84 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
84
85
85 beaker.cache.super_short_term.type=memory
86 beaker.cache.super_short_term.type=memory
@@ -147,37 +148,49 b' sqlalchemy.convert_unicode = true'
147 ### LOGGING CONFIGURATION ####
148 ### LOGGING CONFIGURATION ####
148 ################################
149 ################################
149 [loggers]
150 [loggers]
150 keys = root, routes, rhodecode, sqlalchemy
151 keys = root, routes, rhodecode, sqlalchemy, beaker, templates
151
152
152 [handlers]
153 [handlers]
153 keys = console
154 keys = console, console_sql
154
155
155 [formatters]
156 [formatters]
156 keys = generic,color_formatter
157 keys = generic, color_formatter, color_formatter_sql
157
158
158 #############
159 #############
159 ## LOGGERS ##
160 ## LOGGERS ##
160 #############
161 #############
161 [logger_root]
162 [logger_root]
162 level = INFO
163 level = NOTSET
163 handlers = console
164 handlers = console
164
165
165 [logger_routes]
166 [logger_routes]
166 level = INFO
167 level = DEBUG
167 handlers = console
168 handlers =
168 qualname = routes.middleware
169 qualname = routes.middleware
169 # "level = DEBUG" logs the route matched and routing variables.
170 # "level = DEBUG" logs the route matched and routing variables.
170 propagate = 0
171 propagate = 1
172
173 [logger_beaker]
174 level = DEBUG
175 handlers =
176 qualname = beaker.container
177 propagate = 1
178
179 [logger_templates]
180 level = INFO
181 handlers =
182 qualname = pylons.templating
183 propagate = 1
171
184
172 [logger_rhodecode]
185 [logger_rhodecode]
173 level = DEBUG
186 level = DEBUG
174 handlers = console
187 handlers =
175 qualname = rhodecode
188 qualname = rhodecode
176 propagate = 0
189 propagate = 1
177
190
178 [logger_sqlalchemy]
191 [logger_sqlalchemy]
179 level = ERROR
192 level = INFO
180 handlers = console
193 handlers = console_sql
181 qualname = sqlalchemy.engine
194 qualname = sqlalchemy.engine
182 propagate = 0
195 propagate = 0
183
196
@@ -188,9 +201,15 b' propagate = 0'
188 [handler_console]
201 [handler_console]
189 class = StreamHandler
202 class = StreamHandler
190 args = (sys.stderr,)
203 args = (sys.stderr,)
191 level = NOTSET
204 level = INFO
192 formatter = color_formatter
205 formatter = color_formatter
193
206
207 [handler_console_sql]
208 class = StreamHandler
209 args = (sys.stderr,)
210 level = WARN
211 formatter = color_formatter_sql
212
194 ################
213 ################
195 ## FORMATTERS ##
214 ## FORMATTERS ##
196 ################
215 ################
@@ -202,4 +221,9 b' datefmt = %Y-%m-%d %H:%M:%S'
202 [formatter_color_formatter]
221 [formatter_color_formatter]
203 class=rhodecode.lib.colored_formatter.ColorFormatter
222 class=rhodecode.lib.colored_formatter.ColorFormatter
204 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
223 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
224 datefmt = %Y-%m-%d %H:%M:%S
225
226 [formatter_color_formatter_sql]
227 class=rhodecode.lib.colored_formatter.ColorFormatterSql
228 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
205 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
229 datefmt = %Y-%m-%d %H:%M:%S
@@ -2,6 +2,7 b' import sys'
2 from rhodecode import get_version
2 from rhodecode import get_version
3 from rhodecode import __platform__
3 from rhodecode import __platform__
4 from rhodecode import __license__
4 from rhodecode import __license__
5 from rhodecode import PLATFORM_OTHERS
5
6
6 py_version = sys.version_info
7 py_version = sys.version_info
7
8
@@ -36,7 +37,7 b' if py_version < (2, 6):'
36 requirements.append("simplejson")
37 requirements.append("simplejson")
37 requirements.append("pysqlite")
38 requirements.append("pysqlite")
38
39
39 if __platform__ in ('Linux', 'Darwin'):
40 if __platform__ in PLATFORM_OTHERS:
40 requirements.append("py-bcrypt")
41 requirements.append("py-bcrypt")
41
42
42
43
General Comments 0
You need to be logged in to leave comments. Login now