Show More
@@ -1,216 +1,229 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 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | 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 | |
17 | #app_email_from = rhodecode-noreply@localhost |
|
17 | #app_email_from = rhodecode-noreply@localhost | |
18 | #error_message = |
|
18 | #error_message = | |
19 |
|
19 | |||
20 | #smtp_server = mail.server.com |
|
20 | #smtp_server = mail.server.com | |
21 | #smtp_username = |
|
21 | #smtp_username = | |
22 | #smtp_password = |
|
22 | #smtp_password = | |
23 | #smtp_port = |
|
23 | #smtp_port = | |
24 | #smtp_use_tls = false |
|
24 | #smtp_use_tls = false | |
25 | #smtp_use_ssl = true |
|
25 | #smtp_use_ssl = true | |
26 |
|
26 | |||
27 | [server:main] |
|
27 | [server:main] | |
28 | ##nr of threads to spawn |
|
28 | ##nr of threads to spawn | |
29 | threadpool_workers = 5 |
|
29 | threadpool_workers = 5 | |
30 |
|
30 | |||
31 | ##max request before thread respawn |
|
31 | ##max request before thread respawn | |
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 = |
|
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 | |
39 | port = 5000 |
|
39 | port = 5000 | |
40 |
|
40 | |||
41 | [app:main] |
|
41 | [app:main] | |
42 | use = egg:rhodecode |
|
42 | use = egg:rhodecode | |
43 | full_stack = true |
|
43 | full_stack = true | |
44 | static_files = true |
|
44 | 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 | |||
51 | #################################### |
|
52 | #################################### | |
52 | ### CELERY CONFIG #### |
|
53 | ### CELERY CONFIG #### | |
53 | #################################### |
|
54 | #################################### | |
54 | use_celery = false |
|
55 | use_celery = false | |
55 | broker.host = localhost |
|
56 | broker.host = localhost | |
56 | broker.vhost = rabbitmqhost |
|
57 | broker.vhost = rabbitmqhost | |
57 | broker.port = 5672 |
|
58 | broker.port = 5672 | |
58 | broker.user = rabbitmq |
|
59 | broker.user = rabbitmq | |
59 | broker.password = qweqwe |
|
60 | broker.password = qweqwe | |
60 |
|
61 | |||
61 | celery.imports = rhodecode.lib.celerylib.tasks |
|
62 | celery.imports = rhodecode.lib.celerylib.tasks | |
62 |
|
63 | |||
63 | celery.result.backend = amqp |
|
64 | celery.result.backend = amqp | |
64 | celery.result.dburi = amqp:// |
|
65 | celery.result.dburi = amqp:// | |
65 | celery.result.serialier = json |
|
66 | celery.result.serialier = json | |
66 |
|
67 | |||
67 | #celery.send.task.error.emails = true |
|
68 | #celery.send.task.error.emails = true | |
68 | #celery.amqp.task.result.expires = 18000 |
|
69 | #celery.amqp.task.result.expires = 18000 | |
69 |
|
70 | |||
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 = |
|
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 | |
77 |
|
78 | |||
78 | #################################### |
|
79 | #################################### | |
79 | ### BEAKER CACHE #### |
|
80 | ### BEAKER CACHE #### | |
80 | #################################### |
|
81 | #################################### | |
81 |
beaker.cache.data_dir= |
|
82 | beaker.cache.data_dir=%(here)s/data/cache/data | |
82 |
beaker.cache.lock_dir= |
|
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 | |
86 | beaker.cache.super_short_term.expire=10 |
|
88 | beaker.cache.super_short_term.expire=10 | |
87 |
|
89 | |||
88 | beaker.cache.short_term.type=memory |
|
90 | beaker.cache.short_term.type=memory | |
89 | beaker.cache.short_term.expire=60 |
|
91 | beaker.cache.short_term.expire=60 | |
90 |
|
92 | |||
91 | beaker.cache.long_term.type=memory |
|
93 | beaker.cache.long_term.type=memory | |
92 | beaker.cache.long_term.expire=36000 |
|
94 | beaker.cache.long_term.expire=36000 | |
93 |
|
95 | |||
94 | beaker.cache.sql_cache_short.type=memory |
|
96 | beaker.cache.sql_cache_short.type=memory | |
95 | beaker.cache.sql_cache_short.expire=10 |
|
97 | beaker.cache.sql_cache_short.expire=10 | |
96 |
|
98 | |||
97 | beaker.cache.sql_cache_med.type=memory |
|
99 | beaker.cache.sql_cache_med.type=memory | |
98 | beaker.cache.sql_cache_med.expire=360 |
|
100 | beaker.cache.sql_cache_med.expire=360 | |
99 |
|
101 | |||
100 | beaker.cache.sql_cache_long.type=file |
|
102 | beaker.cache.sql_cache_long.type=file | |
101 | beaker.cache.sql_cache_long.expire=3600 |
|
103 | beaker.cache.sql_cache_long.expire=3600 | |
102 |
|
104 | |||
103 | #################################### |
|
105 | #################################### | |
104 | ### BEAKER SESSION #### |
|
106 | ### BEAKER SESSION #### | |
105 | #################################### |
|
107 | #################################### | |
106 | ## Type of storage used for the session, current types are |
|
108 | ## Type of storage used for the session, current types are | |
107 | ## dbm, file, memcached, database, and memory. |
|
109 | ## dbm, file, memcached, database, and memory. | |
108 | ## The storage uses the Container API |
|
110 | ## The storage uses the Container API | |
109 | ##that is also used by the cache system. |
|
111 | ##that is also used by the cache system. | |
110 | beaker.session.type = file |
|
112 | beaker.session.type = file | |
111 |
|
113 | |||
112 | beaker.session.key = rhodecode |
|
114 | beaker.session.key = rhodecode | |
113 | beaker.session.secret = g654dcno0-9873jhgfreyu |
|
115 | beaker.session.secret = g654dcno0-9873jhgfreyu | |
114 | beaker.session.timeout = 36000 |
|
116 | beaker.session.timeout = 36000 | |
115 |
|
117 | |||
116 | ##auto save the session to not to use .save() |
|
118 | ##auto save the session to not to use .save() | |
117 | beaker.session.auto = False |
|
119 | beaker.session.auto = False | |
118 |
|
120 | |||
119 | ##true exire at browser close |
|
121 | ##true exire at browser close | |
120 | #beaker.session.cookie_expires = 3600 |
|
122 | #beaker.session.cookie_expires = 3600 | |
121 |
|
123 | |||
122 |
|
124 | |||
123 | ################################################################################ |
|
125 | ################################################################################ | |
124 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
126 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
125 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
127 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
126 | ## execute malicious code after an exception is raised. ## |
|
128 | ## execute malicious code after an exception is raised. ## | |
127 | ################################################################################ |
|
129 | ################################################################################ | |
128 | #set debug = false |
|
130 | #set debug = false | |
129 |
|
131 | |||
130 | ################################## |
|
132 | ################################## | |
131 | ### LOGVIEW CONFIG ### |
|
133 | ### LOGVIEW CONFIG ### | |
132 | ################################## |
|
134 | ################################## | |
133 | logview.sqlalchemy = #faa |
|
135 | logview.sqlalchemy = #faa | |
134 | logview.pylons.templating = #bfb |
|
136 | logview.pylons.templating = #bfb | |
135 | logview.pylons.util = #eee |
|
137 | logview.pylons.util = #eee | |
136 |
|
138 | |||
137 | ######################################################### |
|
139 | ######################################################### | |
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 |
|
|
143 | sqlalchemy.db1.echo = True | |
142 |
|
|
144 | sqlalchemy.db1.pool_recycle = 3600 | |
143 | sqlalchemy.convert_unicode = true |
|
145 | sqlalchemy.convert_unicode = true | |
144 |
|
146 | |||
145 | ################################ |
|
147 | ################################ | |
146 | ### LOGGING CONFIGURATION #### |
|
148 | ### LOGGING CONFIGURATION #### | |
147 | ################################ |
|
149 | ################################ | |
148 | [loggers] |
|
150 | [loggers] | |
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 ## | |
159 | ############# |
|
161 | ############# | |
160 | [logger_root] |
|
162 | [logger_root] | |
161 | level = NOTSET |
|
163 | level = NOTSET | |
162 | handlers = console |
|
164 | handlers = console | |
163 |
|
165 | |||
164 | [logger_routes] |
|
166 | [logger_routes] | |
165 | level = DEBUG |
|
167 | level = DEBUG | |
166 |
handlers = |
|
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 = |
|
171 | propagate = 1 | |
170 |
|
172 | |||
171 | [logger_beaker] |
|
173 | [logger_beaker] | |
172 |
level = |
|
174 | level = DEBUG | |
173 |
handlers = |
|
175 | handlers = | |
174 | qualname = beaker.container |
|
176 | qualname = beaker.container | |
175 |
propagate = |
|
177 | propagate = 1 | |
176 |
|
178 | |||
177 | [logger_templates] |
|
179 | [logger_templates] | |
178 | level = INFO |
|
180 | level = INFO | |
179 |
handlers = |
|
181 | handlers = | |
180 | qualname = pylons.templating |
|
182 | qualname = pylons.templating | |
181 |
propagate = |
|
183 | propagate = 1 | |
182 |
|
184 | |||
183 | [logger_rhodecode] |
|
185 | [logger_rhodecode] | |
184 | level = DEBUG |
|
186 | level = DEBUG | |
185 |
handlers = |
|
187 | handlers = | |
186 | qualname = rhodecode |
|
188 | qualname = rhodecode | |
187 |
propagate = |
|
189 | propagate = 1 | |
188 |
|
190 | |||
189 | [logger_sqlalchemy] |
|
191 | [logger_sqlalchemy] | |
190 |
level = |
|
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 | |||
195 | ############## |
|
197 | ############## | |
196 | ## HANDLERS ## |
|
198 | ## HANDLERS ## | |
197 | ############## |
|
199 | ############## | |
198 |
|
200 | |||
199 | [handler_console] |
|
201 | [handler_console] | |
200 | class = StreamHandler |
|
202 | class = StreamHandler | |
201 | args = (sys.stderr,) |
|
203 | 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 | ################ | |
208 |
|
216 | |||
209 | [formatter_generic] |
|
217 | [formatter_generic] | |
210 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
218 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
211 | datefmt = %Y-%m-%d %H:%M:%S |
|
219 | datefmt = %Y-%m-%d %H:%M:%S | |
212 |
|
220 | |||
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 |
@@ -1,57 +1,56 b'' | |||||
1 | .. _index: |
|
1 | .. _index: | |
2 |
|
2 | |||
3 | .. include:: ./../README.rst |
|
3 | .. include:: ./../README.rst | |
4 |
|
4 | |||
5 | Documentation |
|
5 | Documentation | |
6 | ------------- |
|
6 | ------------- | |
7 |
|
7 | |||
8 | **Installation:** |
|
8 | **Installation:** | |
9 |
|
9 | |||
10 | .. toctree:: |
|
10 | .. toctree:: | |
11 | :maxdepth: 1 |
|
11 | :maxdepth: 1 | |
12 |
|
12 | |||
13 | installation |
|
13 | installation | |
14 | setup |
|
14 | setup | |
15 | upgrade |
|
15 | upgrade | |
16 |
|
16 | |||
17 | **Usage** |
|
17 | **Usage** | |
18 |
|
18 | |||
19 | .. toctree:: |
|
19 | .. toctree:: | |
20 | :maxdepth: 1 |
|
20 | :maxdepth: 1 | |
21 |
|
21 | |||
22 | enable_git |
|
22 | enable_git | |
23 | statistics |
|
23 | statistics | |
24 |
|
24 | |||
25 | **Develop** |
|
25 | **Develop** | |
26 |
|
26 | |||
27 | .. toctree:: |
|
27 | .. toctree:: | |
28 | :maxdepth: 1 |
|
28 | :maxdepth: 1 | |
29 |
|
29 | |||
30 | contributing |
|
30 | contributing | |
31 | changelog |
|
31 | changelog | |
32 |
|
32 | |||
33 | **API** |
|
33 | **API** | |
34 |
|
34 | |||
35 | .. toctree:: |
|
35 | .. toctree:: | |
36 | :maxdepth: 2 |
|
36 | :maxdepth: 2 | |
37 |
|
37 | |||
38 | api/index |
|
38 | api/index | |
39 |
|
39 | |||
40 |
|
40 | |||
41 | Other topics |
|
41 | Other topics | |
42 | ------------ |
|
42 | ------------ | |
43 |
|
43 | |||
44 | * :ref:`genindex` |
|
44 | * :ref:`genindex` | |
45 | * :ref:`search` |
|
45 | * :ref:`search` | |
46 |
|
46 | |||
47 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
47 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
48 | .. _python: http://www.python.org/ |
|
48 | .. _python: http://www.python.org/ | |
49 | .. _django: http://www.djangoproject.com/ |
|
49 | .. _django: http://www.djangoproject.com/ | |
50 | .. _mercurial: http://mercurial.selenic.com/ |
|
50 | .. _mercurial: http://mercurial.selenic.com/ | |
51 | .. _bitbucket: http://bitbucket.org/ |
|
51 | .. _bitbucket: http://bitbucket.org/ | |
52 | .. _subversion: http://subversion.tigris.org/ |
|
52 | .. _subversion: http://subversion.tigris.org/ | |
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 |
|
@@ -1,384 +1,385 b'' | |||||
1 | .. _setup: |
|
1 | .. _setup: | |
2 |
|
2 | |||
3 | Setup |
|
3 | Setup | |
4 | ===== |
|
4 | ===== | |
5 |
|
5 | |||
6 |
|
6 | |||
7 | Setting up RhodeCode |
|
7 | Setting up RhodeCode | |
8 | -------------------------- |
|
8 | -------------------------- | |
9 |
|
9 | |||
10 | First, you will need to create a RhodeCode configuration file. Run the following |
|
10 | First, you will need to create a RhodeCode configuration file. Run the following | |
11 | command to do this:: |
|
11 | command to do this:: | |
12 |
|
12 | |||
13 | paster make-config RhodeCode production.ini |
|
13 | paster make-config RhodeCode production.ini | |
14 |
|
14 | |||
15 | - This will create the file `production.ini` in the current directory. This |
|
15 | - This will create the file `production.ini` in the current directory. This | |
16 | configuration file contains the various settings for RhodeCode, e.g proxy port, |
|
16 | configuration file contains the various settings for RhodeCode, e.g proxy port, | |
17 | email settings, usage of static files, cache, celery settings and logging. |
|
17 | email settings, usage of static files, cache, celery settings and logging. | |
18 |
|
18 | |||
19 |
|
19 | |||
20 | Next, you need to create the databases used by RhodeCode. I recommend that you |
|
20 | Next, you need to create the databases used by RhodeCode. I recommend that you | |
21 | use sqlite (default) or postgresql. If you choose a database other than the |
|
21 | use sqlite (default) or postgresql. If you choose a database other than the | |
22 | default ensure you properly adjust the db url in your production.ini |
|
22 | default ensure you properly adjust the db url in your production.ini | |
23 | configuration file to use this other database. Create the databases by running |
|
23 | configuration file to use this other database. Create the databases by running | |
24 | the following command:: |
|
24 | the following command:: | |
25 |
|
25 | |||
26 | paster setup-app production.ini |
|
26 | paster setup-app production.ini | |
27 |
|
27 | |||
28 | This will prompt you for a "root" path. This "root" path is the location where |
|
28 | This will prompt you for a "root" path. This "root" path is the location where | |
29 | RhodeCode will store all of its repositories on the current machine. After |
|
29 | RhodeCode will store all of its repositories on the current machine. After | |
30 | entering this "root" path ``setup-app`` will also prompt you for a username and password |
|
30 | entering this "root" path ``setup-app`` will also prompt you for a username and password | |
31 | for the initial admin account which ``setup-app`` sets up for you. |
|
31 | for the initial admin account which ``setup-app`` sets up for you. | |
32 |
|
32 | |||
33 | - The ``setup-app`` command will create all of the needed tables and an admin |
|
33 | - The ``setup-app`` command will create all of the needed tables and an admin | |
34 | account. When choosing a root path you can either use a new empty location, or a |
|
34 | account. When choosing a root path you can either use a new empty location, or a | |
35 | location which already contains existing repositories. If you choose a location |
|
35 | location which already contains existing repositories. If you choose a location | |
36 | which contains existing repositories RhodeCode will simply add all of the |
|
36 | which contains existing repositories RhodeCode will simply add all of the | |
37 | repositories at the chosen location to it's database. (Note: make sure you |
|
37 | repositories at the chosen location to it's database. (Note: make sure you | |
38 | specify the correct path to the root). |
|
38 | specify the correct path to the root). | |
39 | - Note: the given path for mercurial_ repositories **must** be write accessible |
|
39 | - Note: the given path for mercurial_ repositories **must** be write accessible | |
40 | for the application. It's very important since the RhodeCode web interface will |
|
40 | for the application. It's very important since the RhodeCode web interface will | |
41 | work without write access, but when trying to do a push it will eventually fail |
|
41 | work without write access, but when trying to do a push it will eventually fail | |
42 | with permission denied errors unless it has write access. |
|
42 | with permission denied errors unless it has write access. | |
43 |
|
43 | |||
44 | You are now ready to use RhodeCode, to run it simply execute:: |
|
44 | You are now ready to use RhodeCode, to run it simply execute:: | |
45 |
|
45 | |||
46 | paster serve production.ini |
|
46 | paster serve production.ini | |
47 |
|
47 | |||
48 | - This command runs the RhodeCode server. The web app should be available at the |
|
48 | - This command runs the RhodeCode server. The web app should be available at the | |
49 | 127.0.0.1:5000. This ip and port is configurable via the production.ini |
|
49 | 127.0.0.1:5000. This ip and port is configurable via the production.ini | |
50 | file created in previous step |
|
50 | file created in previous step | |
51 | - Use the admin account you created above when running ``setup-app`` to login to the web app. |
|
51 | - Use the admin account you created above when running ``setup-app`` to login to the web app. | |
52 | - The default permissions on each repository is read, and the owner is admin. |
|
52 | - The default permissions on each repository is read, and the owner is admin. | |
53 | Remember to update these if needed. |
|
53 | Remember to update these if needed. | |
54 | - In the admin panel you can toggle ldap, anonymous, permissions settings. As |
|
54 | - In the admin panel you can toggle ldap, anonymous, permissions settings. As | |
55 | well as edit more advanced options on users and repositories |
|
55 | well as edit more advanced options on users and repositories | |
56 |
|
56 | |||
57 | Try copying your own mercurial repository into the "root" directory you are |
|
57 | Try copying your own mercurial repository into the "root" directory you are | |
58 | using, then from within the RhodeCode web application choose Admin > |
|
58 | using, then from within the RhodeCode web application choose Admin > | |
59 | repositories. Then choose Add New Repository. Add the repository you copied into |
|
59 | repositories. Then choose Add New Repository. Add the repository you copied into | |
60 | the root. Test that you can browse your repository from within RhodeCode and then |
|
60 | the root. Test that you can browse your repository from within RhodeCode and then | |
61 | try cloning your repository from RhodeCode with:: |
|
61 | try cloning your repository from RhodeCode with:: | |
62 |
|
62 | |||
63 | hg clone http://127.0.0.1:5000/<repository name> |
|
63 | hg clone http://127.0.0.1:5000/<repository name> | |
64 |
|
64 | |||
65 | where *repository name* is replaced by the name of your repository. |
|
65 | where *repository name* is replaced by the name of your repository. | |
66 |
|
66 | |||
67 | Using RhodeCode with SSH |
|
67 | Using RhodeCode with SSH | |
68 | ------------------------ |
|
68 | ------------------------ | |
69 |
|
69 | |||
70 | RhodeCode currently only hosts repositories using http and https. (The addition of |
|
70 | RhodeCode currently only hosts repositories using http and https. (The addition of | |
71 | ssh hosting is a planned future feature.) However you can easily use ssh in |
|
71 | ssh hosting is a planned future feature.) However you can easily use ssh in | |
72 | parallel with RhodeCode. (Repository access via ssh is a standard "out of |
|
72 | parallel with RhodeCode. (Repository access via ssh is a standard "out of | |
73 | the box" feature of mercurial_ and you can use this to access any of the |
|
73 | the box" feature of mercurial_ and you can use this to access any of the | |
74 | repositories that RhodeCode is hosting. See PublishingRepositories_) |
|
74 | repositories that RhodeCode is hosting. See PublishingRepositories_) | |
75 |
|
75 | |||
76 | RhodeCode repository structures are kept in directories with the same name |
|
76 | RhodeCode repository structures are kept in directories with the same name | |
77 | as the project. When using repository groups, each group is a subdirectory. |
|
77 | as the project. When using repository groups, each group is a subdirectory. | |
78 | This allows you to easily use ssh for accessing repositories. |
|
78 | This allows you to easily use ssh for accessing repositories. | |
79 |
|
79 | |||
80 | In order to use ssh you need to make sure that your web-server and the users login |
|
80 | In order to use ssh you need to make sure that your web-server and the users login | |
81 | accounts have the correct permissions set on the appropriate directories. (Note |
|
81 | accounts have the correct permissions set on the appropriate directories. (Note | |
82 | that these permissions are independent of any permissions you have set up using |
|
82 | that these permissions are independent of any permissions you have set up using | |
83 | the RhodeCode web interface.) |
|
83 | the RhodeCode web interface.) | |
84 |
|
84 | |||
85 | If your main directory (the same as set in RhodeCode settings) is for example |
|
85 | If your main directory (the same as set in RhodeCode settings) is for example | |
86 | set to **/home/hg** and the repository you are using is named `rhodecode`, then |
|
86 | set to **/home/hg** and the repository you are using is named `rhodecode`, then | |
87 | to clone via ssh you should run:: |
|
87 | to clone via ssh you should run:: | |
88 |
|
88 | |||
89 | hg clone ssh://user@server.com/home/hg/rhodecode |
|
89 | hg clone ssh://user@server.com/home/hg/rhodecode | |
90 |
|
90 | |||
91 | Using other external tools such as mercurial-server_ or using ssh key based |
|
91 | Using other external tools such as mercurial-server_ or using ssh key based | |
92 | authentication is fully supported. |
|
92 | authentication is fully supported. | |
93 |
|
93 | |||
94 | Note: In an advanced setup, in order for your ssh access to use the same |
|
94 | Note: In an advanced setup, in order for your ssh access to use the same | |
95 | permissions as set up via the RhodeCode web interface, you can create an |
|
95 | permissions as set up via the RhodeCode web interface, you can create an | |
96 | authentication hook to connect to the rhodecode db and runs check functions for |
|
96 | authentication hook to connect to the rhodecode db and runs check functions for | |
97 | permissions against that. |
|
97 | permissions against that. | |
98 |
|
98 | |||
99 |
|
99 | |||
100 |
|
100 | |||
101 | Setting up Whoosh full text search |
|
101 | Setting up Whoosh full text search | |
102 | ---------------------------------- |
|
102 | ---------------------------------- | |
103 |
|
103 | |||
104 | Starting from version 1.1 the whoosh index can be build by using the paster |
|
104 | Starting from version 1.1 the whoosh index can be build by using the paster | |
105 | command ``make-index``. To use ``make-index`` you must specify the configuration |
|
105 | command ``make-index``. To use ``make-index`` you must specify the configuration | |
106 | file that stores the location of the index, and the location of the repositories |
|
106 | file that stores the location of the index, and the location of the repositories | |
107 | (`--repo-location`). |
|
107 | (`--repo-location`). | |
108 |
|
108 | |||
109 | You may optionally pass the option `-f` to enable a full index rebuild. Without |
|
109 | You may optionally pass the option `-f` to enable a full index rebuild. Without | |
110 | the `-f` option, indexing will run always in "incremental" mode. |
|
110 | the `-f` option, indexing will run always in "incremental" mode. | |
111 |
|
111 | |||
112 | For an incremental index build use:: |
|
112 | For an incremental index build use:: | |
113 |
|
113 | |||
114 | paster make-index production.ini --repo-location=<location for repos> |
|
114 | paster make-index production.ini --repo-location=<location for repos> | |
115 |
|
115 | |||
116 | For a full index rebuild use:: |
|
116 | For a full index rebuild use:: | |
117 |
|
117 | |||
118 | paster make-index production.ini -f --repo-location=<location for repos> |
|
118 | paster make-index production.ini -f --repo-location=<location for repos> | |
119 |
|
119 | |||
120 | - For full text search you can either put crontab entry for |
|
120 | - For full text search you can either put crontab entry for | |
121 |
|
121 | |||
122 | In order to do periodical index builds and keep your index always up to date. |
|
122 | In order to do periodical index builds and keep your index always up to date. | |
123 | It's recommended to do a crontab entry for incremental indexing. |
|
123 | It's recommended to do a crontab entry for incremental indexing. | |
124 | An example entry might look like this:: |
|
124 | An example entry might look like this:: | |
125 |
|
125 | |||
126 | /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos> |
|
126 | /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos> | |
127 |
|
127 | |||
128 | When using incremental mode (the default) whoosh will check the last |
|
128 | When using incremental mode (the default) whoosh will check the last | |
129 | modification date of each file and add it to be reindexed if a newer file is |
|
129 | modification date of each file and add it to be reindexed if a newer file is | |
130 | available. The indexing daemon checks for any removed files and removes them |
|
130 | available. The indexing daemon checks for any removed files and removes them | |
131 | from index. |
|
131 | from index. | |
132 |
|
132 | |||
133 | If you want to rebuild index from scratch, you can use the `-f` flag as above, |
|
133 | If you want to rebuild index from scratch, you can use the `-f` flag as above, | |
134 | or in the admin panel you can check `build from scratch` flag. |
|
134 | or in the admin panel you can check `build from scratch` flag. | |
135 |
|
135 | |||
136 |
|
136 | |||
137 | Setting up LDAP support |
|
137 | Setting up LDAP support | |
138 | ----------------------- |
|
138 | ----------------------- | |
139 |
|
139 | |||
140 | RhodeCode starting from version 1.1 supports ldap authentication. In order |
|
140 | RhodeCode starting from version 1.1 supports ldap authentication. In order | |
141 | to use LDAP, you have to install the python-ldap_ package. This package is available |
|
141 | to use LDAP, you have to install the python-ldap_ package. This package is available | |
142 | via pypi, so you can install it by running |
|
142 | via pypi, so you can install it by running | |
143 |
|
143 | |||
144 | :: |
|
144 | :: | |
145 |
|
145 | |||
146 | easy_install python-ldap |
|
146 | easy_install python-ldap | |
147 |
|
147 | |||
148 | :: |
|
148 | :: | |
149 |
|
149 | |||
150 | pip install python-ldap |
|
150 | pip install python-ldap | |
151 |
|
151 | |||
152 | .. note:: |
|
152 | .. note:: | |
153 | python-ldap requires some certain libs on your system, so before installing |
|
153 | python-ldap requires some certain libs on your system, so before installing | |
154 | it check that you have at least `openldap`, and `sasl` libraries. |
|
154 | it check that you have at least `openldap`, and `sasl` libraries. | |
155 |
|
155 | |||
156 | ldap settings are located in admin->ldap section, |
|
156 | ldap settings are located in admin->ldap section, | |
157 |
|
157 | |||
158 | Here's a typical ldap setup:: |
|
158 | Here's a typical ldap setup:: | |
159 |
|
159 | |||
160 | Enable ldap = checked #controls if ldap access is enabled |
|
160 | Enable ldap = checked #controls if ldap access is enabled | |
161 | Host = host.domain.org #actual ldap server to connect |
|
161 | Host = host.domain.org #actual ldap server to connect | |
162 | Port = 389 or 689 for ldaps #ldap server ports |
|
162 | Port = 389 or 689 for ldaps #ldap server ports | |
163 | Enable LDAPS = unchecked #enable disable ldaps |
|
163 | Enable LDAPS = unchecked #enable disable ldaps | |
164 | Account = <account> #access for ldap server(if required) |
|
164 | Account = <account> #access for ldap server(if required) | |
165 | Password = <password> #password for ldap server(if required) |
|
165 | Password = <password> #password for ldap server(if required) | |
166 | Base DN = uid=%(user)s,CN=users,DC=host,DC=domain,DC=org |
|
166 | Base DN = uid=%(user)s,CN=users,DC=host,DC=domain,DC=org | |
167 |
|
167 | |||
168 |
|
168 | |||
169 | `Account` and `Password` are optional, and used for two-phase ldap |
|
169 | `Account` and `Password` are optional, and used for two-phase ldap | |
170 | authentication so those are credentials to access your ldap, if it doesn't |
|
170 | authentication so those are credentials to access your ldap, if it doesn't | |
171 | support anonymous search/user lookups. |
|
171 | support anonymous search/user lookups. | |
172 |
|
172 | |||
173 | Base DN must have the %(user)s template inside, it's a place holder where your uid |
|
173 | Base DN must have the %(user)s template inside, it's a place holder where your uid | |
174 | used to login would go. It allows admins to specify non-standard schema for the |
|
174 | used to login would go. It allows admins to specify non-standard schema for the | |
175 | uid variable. |
|
175 | uid variable. | |
176 |
|
176 | |||
177 | If all of the data is correctly entered, and `python-ldap` is properly |
|
177 | If all of the data is correctly entered, and `python-ldap` is properly | |
178 | installed, then users should be granted access to RhodeCode with ldap accounts. |
|
178 | installed, then users should be granted access to RhodeCode with ldap accounts. | |
179 | When logging in the first time a special ldap account is created inside |
|
179 | When logging in the first time a special ldap account is created inside | |
180 | RhodeCode, so you can control the permissions even on ldap users. If such users |
|
180 | RhodeCode, so you can control the permissions even on ldap users. If such users | |
181 | already exist in the RhodeCode database, then the ldap user with the same |
|
181 | already exist in the RhodeCode database, then the ldap user with the same | |
182 | username would be not be able to access RhodeCode. |
|
182 | username would be not be able to access RhodeCode. | |
183 |
|
183 | |||
184 | If you have problems with ldap access and believe you have correctly entered the |
|
184 | If you have problems with ldap access and believe you have correctly entered the | |
185 | required information then proceed by investigating the RhodeCode logs. Any |
|
185 | required information then proceed by investigating the RhodeCode logs. Any | |
186 | error messages sent from ldap will be saved there. |
|
186 | error messages sent from ldap will be saved there. | |
187 |
|
187 | |||
188 |
|
188 | |||
189 |
|
189 | |||
190 | Setting Up Celery |
|
190 | Setting Up Celery | |
191 | ----------------- |
|
191 | ----------------- | |
192 |
|
192 | |||
193 | Since version 1.1 celery is configured by the rhodecode ini configuration files. |
|
193 | Since version 1.1 celery is configured by the rhodecode ini configuration files. | |
194 | Simply set use_celery=true in the ini file then add / change the configuration |
|
194 | Simply set use_celery=true in the ini file then add / change the configuration | |
195 | variables inside the ini file. |
|
195 | variables inside the ini file. | |
196 |
|
196 | |||
197 | Remember that the ini files use the format with '.' not with '_' like celery. |
|
197 | Remember that the ini files use the format with '.' not with '_' like celery. | |
198 | So for example setting `BROKER_HOST` in celery means setting `broker.host` in |
|
198 | So for example setting `BROKER_HOST` in celery means setting `broker.host` in | |
199 | the config file. |
|
199 | the config file. | |
200 |
|
200 | |||
201 | In order to start using celery run:: |
|
201 | In order to start using celery run:: | |
202 |
|
202 | |||
203 | paster celeryd <configfile.ini> |
|
203 | paster celeryd <configfile.ini> | |
204 |
|
204 | |||
205 |
|
205 | |||
206 | .. note:: |
|
206 | .. note:: | |
207 | Make sure you run this command from the same virtualenv, and with the same user |
|
207 | Make sure you run this command from the same virtualenv, and with the same user | |
208 | that rhodecode runs. |
|
208 | that rhodecode runs. | |
209 |
|
209 | |||
210 | HTTPS support |
|
210 | HTTPS support | |
211 | ------------- |
|
211 | ------------- | |
212 |
|
212 | |||
213 | There are two ways to enable https: |
|
213 | There are two ways to enable https: | |
214 |
|
214 | |||
215 | - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will |
|
215 | - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will | |
216 | recognize this headers and make proper https redirections |
|
216 | recognize this headers and make proper https redirections | |
217 | - Alternatively, set `force_https = true` in the ini configuration to force using |
|
217 | - Alternatively, set `force_https = true` in the ini configuration to force using | |
218 | https, no headers are needed than to enable https |
|
218 | https, no headers are needed than to enable https | |
219 |
|
219 | |||
220 |
|
220 | |||
221 | Nginx virtual host example |
|
221 | Nginx virtual host example | |
222 | -------------------------- |
|
222 | -------------------------- | |
223 |
|
223 | |||
224 | Sample config for nginx using proxy:: |
|
224 | Sample config for nginx using proxy:: | |
225 |
|
225 | |||
226 | server { |
|
226 | server { | |
227 | listen 80; |
|
227 | listen 80; | |
228 | server_name hg.myserver.com; |
|
228 | server_name hg.myserver.com; | |
229 | access_log /var/log/nginx/rhodecode.access.log; |
|
229 | access_log /var/log/nginx/rhodecode.access.log; | |
230 | error_log /var/log/nginx/rhodecode.error.log; |
|
230 | error_log /var/log/nginx/rhodecode.error.log; | |
231 | location / { |
|
231 | location / { | |
232 | root /var/www/rhodecode/rhodecode/public/; |
|
232 | root /var/www/rhodecode/rhodecode/public/; | |
233 | if (!-f $request_filename){ |
|
233 | if (!-f $request_filename){ | |
234 | proxy_pass http://127.0.0.1:5000; |
|
234 | proxy_pass http://127.0.0.1:5000; | |
235 | } |
|
235 | } | |
236 | #this is important if you want to use https !!! |
|
236 | #this is important if you want to use https !!! | |
237 | proxy_set_header X-Url-Scheme $scheme; |
|
237 | proxy_set_header X-Url-Scheme $scheme; | |
238 | include /etc/nginx/proxy.conf; |
|
238 | include /etc/nginx/proxy.conf; | |
239 | } |
|
239 | } | |
240 | } |
|
240 | } | |
241 |
|
241 | |||
242 | Here's the proxy.conf. It's tuned so it will not timeout on long |
|
242 | Here's the proxy.conf. It's tuned so it will not timeout on long | |
243 | pushes or large pushes:: |
|
243 | pushes or large pushes:: | |
244 |
|
244 | |||
245 | proxy_redirect off; |
|
245 | proxy_redirect off; | |
246 | proxy_set_header Host $host; |
|
246 | proxy_set_header Host $host; | |
247 | proxy_set_header X-Host $http_host; |
|
247 | proxy_set_header X-Host $http_host; | |
248 | proxy_set_header X-Real-IP $remote_addr; |
|
248 | proxy_set_header X-Real-IP $remote_addr; | |
249 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
249 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
250 | proxy_set_header Proxy-host $proxy_host; |
|
250 | proxy_set_header Proxy-host $proxy_host; | |
251 | client_max_body_size 400m; |
|
251 | client_max_body_size 400m; | |
252 | client_body_buffer_size 128k; |
|
252 | client_body_buffer_size 128k; | |
253 | proxy_buffering off; |
|
253 | proxy_buffering off; | |
254 | proxy_connect_timeout 3600; |
|
254 | proxy_connect_timeout 3600; | |
255 | proxy_send_timeout 3600; |
|
255 | proxy_send_timeout 3600; | |
256 | proxy_read_timeout 3600; |
|
256 | proxy_read_timeout 3600; | |
257 | proxy_buffer_size 16k; |
|
257 | proxy_buffer_size 16k; | |
258 | proxy_buffers 4 16k; |
|
258 | proxy_buffers 4 16k; | |
259 | proxy_busy_buffers_size 64k; |
|
259 | proxy_busy_buffers_size 64k; | |
260 | proxy_temp_file_write_size 64k; |
|
260 | proxy_temp_file_write_size 64k; | |
261 |
|
261 | |||
262 | Also, when using root path with nginx you might set the static files to false |
|
262 | Also, when using root path with nginx you might set the static files to false | |
263 | in the production.ini file:: |
|
263 | in the production.ini file:: | |
264 |
|
264 | |||
265 | [app:main] |
|
265 | [app:main] | |
266 | use = egg:rhodecode |
|
266 | use = egg:rhodecode | |
267 | full_stack = true |
|
267 | full_stack = true | |
268 | static_files = false |
|
268 | static_files = false | |
269 | lang=en |
|
269 | lang=en | |
270 | cache_dir = %(here)s/data |
|
270 | cache_dir = %(here)s/data | |
271 |
|
271 | |||
272 | In order to not have the statics served by the application. This improves speed. |
|
272 | In order to not have the statics served by the application. This improves speed. | |
273 |
|
273 | |||
274 |
|
274 | |||
275 | Apache virtual host example |
|
275 | Apache virtual host example | |
276 | --------------------------- |
|
276 | --------------------------- | |
277 |
|
277 | |||
278 | Here is a sample configuration file for apache using proxy:: |
|
278 | Here is a sample configuration file for apache using proxy:: | |
279 |
|
279 | |||
280 | <VirtualHost *:80> |
|
280 | <VirtualHost *:80> | |
281 | ServerName hg.myserver.com |
|
281 | ServerName hg.myserver.com | |
282 | ServerAlias hg.myserver.com |
|
282 | ServerAlias hg.myserver.com | |
283 |
|
283 | |||
284 | <Proxy *> |
|
284 | <Proxy *> | |
285 | Order allow,deny |
|
285 | Order allow,deny | |
286 | Allow from all |
|
286 | Allow from all | |
287 | </Proxy> |
|
287 | </Proxy> | |
288 |
|
288 | |||
289 | #important ! |
|
289 | #important ! | |
290 | #Directive to properly generate url (clone url) for pylons |
|
290 | #Directive to properly generate url (clone url) for pylons | |
291 | ProxyPreserveHost On |
|
291 | ProxyPreserveHost On | |
292 |
|
292 | |||
293 | #rhodecode instance |
|
293 | #rhodecode instance | |
294 | ProxyPass / http://127.0.0.1:5000/ |
|
294 | ProxyPass / http://127.0.0.1:5000/ | |
295 | ProxyPassReverse / http://127.0.0.1:5000/ |
|
295 | ProxyPassReverse / http://127.0.0.1:5000/ | |
296 |
|
296 | |||
297 | #to enable https use line below |
|
297 | #to enable https use line below | |
298 | #SetEnvIf X-Url-Scheme https HTTPS=1 |
|
298 | #SetEnvIf X-Url-Scheme https HTTPS=1 | |
299 |
|
299 | |||
300 | </VirtualHost> |
|
300 | </VirtualHost> | |
301 |
|
301 | |||
302 |
|
302 | |||
303 | Additional tutorial |
|
303 | Additional tutorial | |
304 | http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons |
|
304 | http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons | |
305 |
|
305 | |||
306 |
|
306 | |||
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 / |
|
312 | <Location /<someprefix> > | |
314 |
ProxyPass http://127.0.0.1:5 |
|
313 | ProxyPass http://127.0.0.1:5000/<someprefix> | |
315 |
ProxyPassReverse http://127.0.0.1:5 |
|
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 | |||
319 | Besides the regular apache setup you will need to add the following to your .ini file:: |
|
318 | Besides the regular apache setup you will need to add the following to your .ini file:: | |
320 |
|
319 | |||
321 | filter-with = proxy-prefix |
|
320 | filter-with = proxy-prefix | |
322 |
|
321 | |||
323 | Add the following at the end of the .ini file:: |
|
322 | Add the following at the end of the .ini file:: | |
324 |
|
323 | |||
325 | [filter:proxy-prefix] |
|
324 | [filter:proxy-prefix] | |
326 | use = egg:PasteDeploy#prefix |
|
325 | use = egg:PasteDeploy#prefix | |
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 | |||
333 | TODO ! |
|
334 | TODO ! | |
334 |
|
335 | |||
335 | Other configuration files |
|
336 | Other configuration files | |
336 | ------------------------- |
|
337 | ------------------------- | |
337 |
|
338 | |||
338 | Some example init.d scripts can be found here, for debian and gentoo: |
|
339 | Some example init.d scripts can be found here, for debian and gentoo: | |
339 |
|
340 | |||
340 | https://rhodeocode.org/rhodecode/files/tip/init.d |
|
341 | https://rhodeocode.org/rhodecode/files/tip/init.d | |
341 |
|
342 | |||
342 |
|
343 | |||
343 | Troubleshooting |
|
344 | Troubleshooting | |
344 | --------------- |
|
345 | --------------- | |
345 |
|
346 | |||
346 | :Q: **Missing static files?** |
|
347 | :Q: **Missing static files?** | |
347 | :A: Make sure either to set the `static_files = true` in the .ini file or |
|
348 | :A: Make sure either to set the `static_files = true` in the .ini file or | |
348 | double check the root path for your http setup. It should point to |
|
349 | double check the root path for your http setup. It should point to | |
349 | for example: |
|
350 | for example: | |
350 | /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public |
|
351 | /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public | |
351 |
|
352 | |||
352 | | |
|
353 | | | |
353 |
|
354 | |||
354 | :Q: **Can't install celery/rabbitmq** |
|
355 | :Q: **Can't install celery/rabbitmq** | |
355 | :A: Don't worry RhodeCode works without them too. No extra setup is required. |
|
356 | :A: Don't worry RhodeCode works without them too. No extra setup is required. | |
356 |
|
357 | |||
357 | | |
|
358 | | | |
358 |
|
359 | |||
359 | :Q: **Long lasting push timeouts?** |
|
360 | :Q: **Long lasting push timeouts?** | |
360 | :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts |
|
361 | :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts | |
361 | are caused by https server and not RhodeCode. |
|
362 | are caused by https server and not RhodeCode. | |
362 |
|
363 | |||
363 | | |
|
364 | | | |
364 |
|
365 | |||
365 | :Q: **Large pushes timeouts?** |
|
366 | :Q: **Large pushes timeouts?** | |
366 | :A: Make sure you set a proper max_body_size for the http server. |
|
367 | :A: Make sure you set a proper max_body_size for the http server. | |
367 |
|
368 | |||
368 | | |
|
369 | | | |
369 |
|
370 | |||
370 | :Q: **Apache doesn't pass basicAuth on pull/push?** |
|
371 | :Q: **Apache doesn't pass basicAuth on pull/push?** | |
371 | :A: Make sure you added `WSGIPassAuthorization true`. |
|
372 | :A: Make sure you added `WSGIPassAuthorization true`. | |
372 |
|
373 | |||
373 | For further questions search the `Issues tracker`_, or post a message in the `google group rhodecode`_ |
|
374 | For further questions search the `Issues tracker`_, or post a message in the `google group rhodecode`_ | |
374 |
|
375 | |||
375 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
376 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
376 | .. _python: http://www.python.org/ |
|
377 | .. _python: http://www.python.org/ | |
377 | .. _mercurial: http://mercurial.selenic.com/ |
|
378 | .. _mercurial: http://mercurial.selenic.com/ | |
378 | .. _celery: http://celeryproject.org/ |
|
379 | .. _celery: http://celeryproject.org/ | |
379 | .. _rabbitmq: http://www.rabbitmq.com/ |
|
380 | .. _rabbitmq: http://www.rabbitmq.com/ | |
380 | .. _python-ldap: http://www.python-ldap.org/ |
|
381 | .. _python-ldap: http://www.python-ldap.org/ | |
381 | .. _mercurial-server: http://www.lshift.net/mercurial-server.html |
|
382 | .. _mercurial-server: http://www.lshift.net/mercurial-server.html | |
382 | .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories |
|
383 | .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories | |
383 | .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues |
|
384 | .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues | |
384 | .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file |
|
385 | .. _google group rhodecode: http://groups.google.com/group/rhodecode |
@@ -1,276 +1,252 b'' | |||||
1 | #!python |
|
1 | #!python | |
2 | """Bootstrap setuptools installation |
|
2 | """Bootstrap setuptools installation | |
3 |
|
3 | |||
4 | If you want to use setuptools in your package's setup.py, just include this |
|
4 | If you want to use setuptools in your package's setup.py, just include this | |
5 | file in the same directory with it, and add this to the top of your setup.py:: |
|
5 | file in the same directory with it, and add this to the top of your setup.py:: | |
6 |
|
6 | |||
7 | from ez_setup import use_setuptools |
|
7 | from ez_setup import use_setuptools | |
8 | use_setuptools() |
|
8 | use_setuptools() | |
9 |
|
9 | |||
10 | If you want to require a specific version of setuptools, set a download |
|
10 | If you want to require a specific version of setuptools, set a download | |
11 | mirror, or use an alternate download directory, you can do so by supplying |
|
11 | mirror, or use an alternate download directory, you can do so by supplying | |
12 | the appropriate options to ``use_setuptools()``. |
|
12 | the appropriate options to ``use_setuptools()``. | |
13 |
|
13 | |||
14 | This file can also be run as a script to install or upgrade setuptools. |
|
14 | This file can also be run as a script to install or upgrade setuptools. | |
15 | """ |
|
15 | """ | |
16 | import sys |
|
16 | import sys | |
17 | DEFAULT_VERSION = "0.6c9" |
|
17 | DEFAULT_VERSION = "0.6c9" | |
18 |
DEFAULT_URL |
|
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', | |
22 | 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', |
|
23 | 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', | |
23 | 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', |
|
24 | 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', | |
24 | 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', |
|
25 | 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', | |
25 | 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', |
|
26 | 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', | |
26 | 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', |
|
27 | 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', | |
27 | 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', |
|
28 | 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', | |
28 | 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', |
|
29 | 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', | |
29 | 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', |
|
30 | 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', | |
30 | 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', |
|
31 | 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', | |
31 | 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', |
|
32 | 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', | |
32 | 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', |
|
33 | 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', | |
33 | 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', |
|
34 | 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', | |
34 | 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', |
|
35 | 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', | |
35 | 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', |
|
36 | 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', | |
36 | 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', |
|
37 | 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', | |
37 | 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', |
|
38 | 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', | |
38 | 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', |
|
39 | 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', | |
39 | 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', |
|
40 | 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', | |
40 | 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', |
|
41 | 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', | |
41 | 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', |
|
42 | 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', | |
42 | 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', |
|
43 | 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', | |
43 | 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', |
|
44 | 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', | |
44 | 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', |
|
45 | 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', | |
45 | 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', |
|
46 | 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', | |
46 | 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', |
|
47 | 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', | |
47 | 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', |
|
48 | 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', | |
48 | 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', |
|
49 | 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', | |
49 | 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', |
|
50 | 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', | |
50 | 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', |
|
51 | 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', | |
51 | 'setuptools-0.6c9-py2.3.egg': 'a83c4020414807b496e4cfbe08507c03', |
|
52 | 'setuptools-0.6c9-py2.3.egg': 'a83c4020414807b496e4cfbe08507c03', | |
52 | 'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a', |
|
53 | 'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a', | |
53 | 'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6', |
|
54 | 'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6', | |
54 | 'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a', |
|
55 | 'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a', | |
55 | } |
|
56 | } | |
56 |
|
57 | |||
57 |
import |
|
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: | |
63 | digest = md5(data).hexdigest() |
|
68 | digest = md5(data).hexdigest() | |
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 |
|
|
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 | |
79 | as an egg for download under the `download_base` URL (which should end with |
|
82 | as an egg for download under the `download_base` URL (which should end with | |
80 | a '/'). `to_dir` is the directory where setuptools will be downloaded, if |
|
83 | a '/'). `to_dir` is the directory where setuptools will be downloaded, if | |
81 | it is not already available. If `download_delay` is specified, it should |
|
84 | it is not already available. If `download_delay` is specified, it should | |
82 | be the number of seconds that will be paused before initiating a download, |
|
85 | be the number of seconds that will be paused before initiating a download, | |
83 | should one be required. If an older version of setuptools is installed, |
|
86 | should one be required. If an older version of setuptools is installed, | |
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 |
|
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, |
|
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) |
|
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 | |
109 | return do_download() |
|
116 | return do_download() | |
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 |
|
|
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 |
|
128 | `delay` is the number of seconds to pause before an actual download | |
|
129 | attempt. | |||
123 | """ |
|
130 | """ | |
124 |
import urllib2 |
|
131 | import urllib2 | |
125 | egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) |
|
132 | ||
|
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) | |
128 | src = dst = None |
|
136 | src = dst = None | |
129 | if not os.path.exists(saveto): # Avoid repeated downloads |
|
137 | if not os.path.exists(saveto): # Avoid repeated downloads | |
130 | try: |
|
138 | try: | |
131 | from distutils import log |
|
139 | from distutils import log | |
132 | if delay: |
|
140 | if delay: | |
133 | log.warn(""" |
|
141 | log.warn(""" | |
134 | --------------------------------------------------------------------------- |
|
142 | --------------------------------------------------------------------------- | |
135 | This script requires setuptools version %s to run (even to display |
|
143 | This script requires setuptools version %s to run (even to display | |
136 | help). I will attempt to download it for you (from |
|
144 | help). I will attempt to download it for you (from | |
137 | %s), but |
|
145 | %s), but | |
138 | you may need to enable firewall access for this script first. |
|
146 | you may need to enable firewall access for this script first. | |
139 | I will start the download in %d seconds. |
|
147 | I will start the download in %d seconds. | |
140 |
|
148 | |||
141 | (Note: if this machine does not have network access, please obtain the file |
|
149 | (Note: if this machine does not have network access, please obtain the file | |
142 |
|
150 | |||
143 | %s |
|
151 | %s | |
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 |
|
|
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") |
|
163 | dst = open(saveto, "wb") | |
|
164 | dst.write(data) | |||
155 | finally: |
|
165 | finally: | |
156 |
if src: |
|
166 | if src: | |
157 |
|
|
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: | |
198 | import setuptools |
|
176 | import setuptools | |
199 | except ImportError: |
|
177 | except ImportError: | |
200 | egg = None |
|
178 | egg = None | |
201 | try: |
|
179 | try: | |
202 | egg = download_setuptools(version, delay=0) |
|
180 | egg = download_setuptools(version, delay=0) | |
203 | sys.path.insert(0,egg) |
|
181 | sys.path.insert(0, egg) | |
204 | from setuptools.command.easy_install import main |
|
182 | from setuptools.command.easy_install import main | |
205 | return main(list(argv)+[egg]) # we're done here |
|
183 | return main(list(argv) + [egg]) # we're done here | |
206 | finally: |
|
184 | finally: | |
207 | if egg and os.path.exists(egg): |
|
185 | if egg and os.path.exists(egg): | |
208 | os.unlink(egg) |
|
186 | os.unlink(egg) | |
209 | else: |
|
187 | else: | |
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 |
|
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 | |
218 | import pkg_resources |
|
196 | import pkg_resources | |
219 | try: |
|
197 | try: | |
220 | pkg_resources.require(req) |
|
198 | pkg_resources.require(req) | |
221 | except pkg_resources.VersionConflict: |
|
199 | except pkg_resources.VersionConflict: | |
222 | try: |
|
200 | try: | |
223 | from setuptools.command.easy_install import main |
|
201 | from setuptools.command.easy_install import main | |
224 | except ImportError: |
|
202 | except ImportError: | |
225 | from easy_install import main |
|
203 | from easy_install import main | |
226 | main(list(argv)+[download_setuptools(delay=0)]) |
|
204 | main(list(argv) + [download_setuptools(delay=0)]) | |
227 | sys.exit(0) # try to force an exit |
|
205 | sys.exit(0) # try to force an exit | |
228 | else: |
|
206 | else: | |
229 | if argv: |
|
207 | if argv: | |
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 |
|
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 | |||
239 | import re |
|
219 | import re | |
240 |
|
220 | |||
241 | for name in filenames: |
|
221 | for name in filenames: | |
242 | base = os.path.basename(name) |
|
222 | base = os.path.basename(name) | |
243 | f = open(name,'rb') |
|
223 | f = open(name, 'rb') | |
244 | md5_data[base] = md5(f.read()).hexdigest() |
|
224 | md5_data[base] = md5(f.read()).hexdigest() | |
245 | f.close() |
|
225 | f.close() | |
246 |
|
226 | |||
247 | data = [" %r: %r,\n" % it for it in md5_data.items()] |
|
227 | data = [" %r: %r,\n" % it for it in md5_data.items()] | |
248 | data.sort() |
|
228 | data.sort() | |
249 | repl = "".join(data) |
|
229 | repl = "".join(data) | |
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') |
|
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: | |
257 | print >>sys.stderr, "Internal error!" |
|
239 | print >> sys.stderr, "Internal error!" | |
258 | sys.exit(2) |
|
240 | sys.exit(2) | |
259 |
|
241 | |||
260 | src = src[:match.start(1)] + repl + src[match.end(1):] |
|
242 | src = src[:match.start(1)] + repl + src[match.end(1):] | |
261 | f = open(srcfile,'w') |
|
243 | f = open(srcfile, 'w') | |
262 | f.write(src) |
|
244 | f.write(src) | |
263 | f.close() |
|
245 | f.close() | |
264 |
|
246 | |||
265 |
|
247 | |||
266 | if __name__=='__main__': |
|
248 | if __name__ == '__main__': | |
267 | if len(sys.argv)>2 and sys.argv[1]=='--md5update': |
|
249 | if len(sys.argv) > 2 and sys.argv[1] == '--md5update': | |
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,205 +1,229 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 |
# |
|
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 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | 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 |
|
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 | |
17 | #app_email_from = rhodecode-noreply@localhost |
|
17 | #app_email_from = rhodecode-noreply@localhost | |
18 | #error_message = |
|
18 | #error_message = | |
19 |
|
19 | |||
20 | #smtp_server = mail.server.com |
|
20 | #smtp_server = mail.server.com | |
21 | #smtp_username = |
|
21 | #smtp_username = | |
22 | #smtp_password = |
|
22 | #smtp_password = | |
23 | #smtp_port = |
|
23 | #smtp_port = | |
24 | #smtp_use_tls = false |
|
24 | #smtp_use_tls = false | |
25 | #smtp_use_ssl = true |
|
25 | #smtp_use_ssl = true | |
26 |
|
26 | |||
27 | [server:main] |
|
27 | [server:main] | |
28 | ##nr of threads to spawn |
|
28 | ##nr of threads to spawn | |
29 | threadpool_workers = 5 |
|
29 | threadpool_workers = 5 | |
30 |
|
30 | |||
31 | ##max request before thread respawn |
|
31 | ##max request before thread respawn | |
32 | threadpool_max_requests = 2 |
|
32 | threadpool_max_requests = 2 | |
33 |
|
33 | |||
34 | ##option to use threads of process |
|
34 | ##option to use threads of process | |
35 | use_threadpool = true |
|
35 | use_threadpool = true | |
36 |
|
36 | |||
37 | use = egg:Paste#http |
|
37 | use = egg:Paste#http | |
38 | host = 127.0.0.1 |
|
38 | host = 127.0.0.1 | |
39 | port = 8001 |
|
39 | port = 8001 | |
40 |
|
40 | |||
41 | [app:main] |
|
41 | [app:main] | |
42 | use = egg:rhodecode |
|
42 | use = egg:rhodecode | |
43 | full_stack = true |
|
43 | full_stack = true | |
44 | static_files = false |
|
44 | static_files = false | |
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 | cut_off_limit = 256000 |
|
48 | cut_off_limit = 256000 | |
49 | force_https = false |
|
49 | force_https = false | |
50 |
|
50 | |||
51 | #################################### |
|
51 | #################################### | |
52 | ### CELERY CONFIG #### |
|
52 | ### CELERY CONFIG #### | |
53 | #################################### |
|
53 | #################################### | |
54 | use_celery = false |
|
54 | use_celery = false | |
55 | broker.host = localhost |
|
55 | broker.host = localhost | |
56 | broker.vhost = rabbitmqhost |
|
56 | broker.vhost = rabbitmqhost | |
57 | broker.port = 5672 |
|
57 | broker.port = 5672 | |
58 | broker.user = rabbitmq |
|
58 | broker.user = rabbitmq | |
59 | broker.password = qweqwe |
|
59 | broker.password = qweqwe | |
60 |
|
60 | |||
61 | celery.imports = rhodecode.lib.celerylib.tasks |
|
61 | celery.imports = rhodecode.lib.celerylib.tasks | |
62 |
|
62 | |||
63 | celery.result.backend = amqp |
|
63 | celery.result.backend = amqp | |
64 | celery.result.dburi = amqp:// |
|
64 | celery.result.dburi = amqp:// | |
65 | celery.result.serialier = json |
|
65 | celery.result.serialier = json | |
66 |
|
66 | |||
67 | #celery.send.task.error.emails = true |
|
67 | #celery.send.task.error.emails = true | |
68 | #celery.amqp.task.result.expires = 18000 |
|
68 | #celery.amqp.task.result.expires = 18000 | |
69 |
|
69 | |||
70 | celeryd.concurrency = 2 |
|
70 | celeryd.concurrency = 2 | |
71 | #celeryd.log.file = celeryd.log |
|
71 | #celeryd.log.file = celeryd.log | |
72 | celeryd.log.level = debug |
|
72 | celeryd.log.level = debug | |
73 | celeryd.max.tasks.per.child = 3 |
|
73 | celeryd.max.tasks.per.child = 3 | |
74 |
|
74 | |||
75 | #tasks will never be sent to the queue, but executed locally instead. |
|
75 | #tasks will never be sent to the queue, but executed locally instead. | |
76 | celery.always.eager = false |
|
76 | celery.always.eager = false | |
77 |
|
77 | |||
78 | #################################### |
|
78 | #################################### | |
79 | ### BEAKER CACHE #### |
|
79 | ### BEAKER CACHE #### | |
80 | #################################### |
|
80 | #################################### | |
81 |
beaker.cache.data_dir= |
|
81 | beaker.cache.data_dir=%(here)s/data/cache/data | |
82 |
beaker.cache.lock_dir= |
|
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 | |
86 | beaker.cache.super_short_term.expire=10 |
|
87 | beaker.cache.super_short_term.expire=10 | |
87 |
|
88 | |||
88 | beaker.cache.short_term.type=memory |
|
89 | beaker.cache.short_term.type=memory | |
89 | beaker.cache.short_term.expire=60 |
|
90 | beaker.cache.short_term.expire=60 | |
90 |
|
91 | |||
91 | beaker.cache.long_term.type=memory |
|
92 | beaker.cache.long_term.type=memory | |
92 | beaker.cache.long_term.expire=36000 |
|
93 | beaker.cache.long_term.expire=36000 | |
93 |
|
94 | |||
94 |
|
95 | |||
95 | beaker.cache.sql_cache_short.type=memory |
|
96 | beaker.cache.sql_cache_short.type=memory | |
96 | beaker.cache.sql_cache_short.expire=5 |
|
97 | beaker.cache.sql_cache_short.expire=5 | |
97 |
|
98 | |||
98 | beaker.cache.sql_cache_med.type=memory |
|
99 | beaker.cache.sql_cache_med.type=memory | |
99 | beaker.cache.sql_cache_med.expire=360 |
|
100 | beaker.cache.sql_cache_med.expire=360 | |
100 |
|
101 | |||
101 | beaker.cache.sql_cache_long.type=file |
|
102 | beaker.cache.sql_cache_long.type=file | |
102 | beaker.cache.sql_cache_long.expire=3600 |
|
103 | beaker.cache.sql_cache_long.expire=3600 | |
103 |
|
104 | |||
104 | #################################### |
|
105 | #################################### | |
105 | ### BEAKER SESSION #### |
|
106 | ### BEAKER SESSION #### | |
106 | #################################### |
|
107 | #################################### | |
107 | ## Type of storage used for the session, current types are |
|
108 | ## Type of storage used for the session, current types are | |
108 | ## dbm, file, memcached, database, and memory. |
|
109 | ## dbm, file, memcached, database, and memory. | |
109 | ## The storage uses the Container API |
|
110 | ## The storage uses the Container API | |
110 | ##that is also used by the cache system. |
|
111 | ##that is also used by the cache system. | |
111 | beaker.session.type = file |
|
112 | beaker.session.type = file | |
112 |
|
113 | |||
113 | beaker.session.key = rhodecode |
|
114 | beaker.session.key = rhodecode | |
114 | beaker.session.secret = g654dcno0-9873jhgfreyu |
|
115 | beaker.session.secret = g654dcno0-9873jhgfreyu | |
115 | beaker.session.timeout = 36000 |
|
116 | beaker.session.timeout = 36000 | |
116 |
|
117 | |||
117 | ##auto save the session to not to use .save() |
|
118 | ##auto save the session to not to use .save() | |
118 | beaker.session.auto = False |
|
119 | beaker.session.auto = False | |
119 |
|
120 | |||
120 | ##true exire at browser close |
|
121 | ##true exire at browser close | |
121 | #beaker.session.cookie_expires = 3600 |
|
122 | #beaker.session.cookie_expires = 3600 | |
122 |
|
123 | |||
123 |
|
124 | |||
124 | ################################################################################ |
|
125 | ################################################################################ | |
125 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
126 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
126 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
127 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
127 | ## execute malicious code after an exception is raised. ## |
|
128 | ## execute malicious code after an exception is raised. ## | |
128 | ################################################################################ |
|
129 | ################################################################################ | |
129 | set debug = false |
|
130 | set debug = false | |
130 |
|
131 | |||
131 | ################################## |
|
132 | ################################## | |
132 | ### LOGVIEW CONFIG ### |
|
133 | ### LOGVIEW CONFIG ### | |
133 | ################################## |
|
134 | ################################## | |
134 | logview.sqlalchemy = #faa |
|
135 | logview.sqlalchemy = #faa | |
135 | logview.pylons.templating = #bfb |
|
136 | logview.pylons.templating = #bfb | |
136 | logview.pylons.util = #eee |
|
137 | logview.pylons.util = #eee | |
137 |
|
138 | |||
138 | ######################################################### |
|
139 | ######################################################### | |
139 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
140 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
140 | ######################################################### |
|
141 | ######################################################### | |
141 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
142 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
142 | #sqlalchemy.db1.echo = False |
|
143 | #sqlalchemy.db1.echo = False | |
143 | #sqlalchemy.db1.pool_recycle = 3600 |
|
144 | #sqlalchemy.db1.pool_recycle = 3600 | |
144 | sqlalchemy.convert_unicode = true |
|
145 | sqlalchemy.convert_unicode = true | |
145 |
|
146 | |||
146 | ################################ |
|
147 | ################################ | |
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 = |
|
163 | level = NOTSET | |
163 | handlers = console |
|
164 | handlers = console | |
164 |
|
165 | |||
165 | [logger_routes] |
|
166 | [logger_routes] | |
166 |
level = |
|
167 | level = DEBUG | |
167 |
handlers = |
|
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 = |
|
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 = |
|
187 | handlers = | |
175 | qualname = rhodecode |
|
188 | qualname = rhodecode | |
176 |
propagate = |
|
189 | propagate = 1 | |
177 |
|
190 | |||
178 | [logger_sqlalchemy] |
|
191 | [logger_sqlalchemy] | |
179 |
level = |
|
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 | |||
184 | ############## |
|
197 | ############## | |
185 | ## HANDLERS ## |
|
198 | ## HANDLERS ## | |
186 | ############## |
|
199 | ############## | |
187 |
|
200 | |||
188 | [handler_console] |
|
201 | [handler_console] | |
189 | class = StreamHandler |
|
202 | class = StreamHandler | |
190 | args = (sys.stderr,) |
|
203 | args = (sys.stderr,) | |
191 |
level = NO |
|
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 | ################ | |
197 |
|
216 | |||
198 | [formatter_generic] |
|
217 | [formatter_generic] | |
199 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
218 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
200 | datefmt = %Y-%m-%d %H:%M:%S |
|
219 | datefmt = %Y-%m-%d %H:%M:%S | |
201 |
|
220 | |||
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 |
@@ -1,115 +1,116 b'' | |||||
1 | import sys |
|
1 | 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 | |||
8 | if py_version < (2, 5): |
|
9 | if py_version < (2, 5): | |
9 | raise Exception('RhodeCode requires python 2.5 or later') |
|
10 | raise Exception('RhodeCode requires python 2.5 or later') | |
10 |
|
11 | |||
11 | requirements = [ |
|
12 | requirements = [ | |
12 | "Pylons==1.0.0", |
|
13 | "Pylons==1.0.0", | |
13 | "WebHelpers==1.2", |
|
14 | "WebHelpers==1.2", | |
14 | "SQLAlchemy==0.6.6", |
|
15 | "SQLAlchemy==0.6.6", | |
15 | "Mako==0.4.0", |
|
16 | "Mako==0.4.0", | |
16 | "vcs==0.1.11", |
|
17 | "vcs==0.1.11", | |
17 | "pygments==1.4.0", |
|
18 | "pygments==1.4.0", | |
18 | "mercurial==1.7.5", |
|
19 | "mercurial==1.7.5", | |
19 | "whoosh==1.3.4", |
|
20 | "whoosh==1.3.4", | |
20 | "celery==2.2.5", |
|
21 | "celery==2.2.5", | |
21 | "babel", |
|
22 | "babel", | |
22 | "python-dateutil>=1.5.0,<2.0.0", |
|
23 | "python-dateutil>=1.5.0,<2.0.0", | |
23 | ] |
|
24 | ] | |
24 |
|
25 | |||
25 | classifiers = ['Development Status :: 5 - Production/Stable', |
|
26 | classifiers = ['Development Status :: 5 - Production/Stable', | |
26 | 'Environment :: Web Environment', |
|
27 | 'Environment :: Web Environment', | |
27 | 'Framework :: Pylons', |
|
28 | 'Framework :: Pylons', | |
28 | 'Intended Audience :: Developers', |
|
29 | 'Intended Audience :: Developers', | |
29 | 'Operating System :: OS Independent', |
|
30 | 'Operating System :: OS Independent', | |
30 | 'Programming Language :: Python', |
|
31 | 'Programming Language :: Python', | |
31 | 'Programming Language :: Python :: 2.5', |
|
32 | 'Programming Language :: Python :: 2.5', | |
32 | 'Programming Language :: Python :: 2.6', |
|
33 | 'Programming Language :: Python :: 2.6', | |
33 | 'Programming Language :: Python :: 2.7', ] |
|
34 | 'Programming Language :: Python :: 2.7', ] | |
34 |
|
35 | |||
35 | if py_version < (2, 6): |
|
36 | 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 | |||
43 | #additional files from project that goes somewhere in the filesystem |
|
44 | #additional files from project that goes somewhere in the filesystem | |
44 | #relative to sys.prefix |
|
45 | #relative to sys.prefix | |
45 | data_files = [] |
|
46 | data_files = [] | |
46 |
|
47 | |||
47 | #additional files that goes into package itself |
|
48 | #additional files that goes into package itself | |
48 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } |
|
49 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } | |
49 |
|
50 | |||
50 | description = ('Mercurial repository browser/management with ' |
|
51 | description = ('Mercurial repository browser/management with ' | |
51 | 'build in push/pull server and full text search') |
|
52 | 'build in push/pull server and full text search') | |
52 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', |
|
53 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', | |
53 | 'repository management', 'hgweb replacement' |
|
54 | 'repository management', 'hgweb replacement' | |
54 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) |
|
55 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) | |
55 | #long description |
|
56 | #long description | |
56 | try: |
|
57 | try: | |
57 | readme_file = 'README.rst' |
|
58 | readme_file = 'README.rst' | |
58 | changelog_file = 'docs/changelog.rst' |
|
59 | changelog_file = 'docs/changelog.rst' | |
59 | long_description = open(readme_file).read() + '\n\n' + \ |
|
60 | long_description = open(readme_file).read() + '\n\n' + \ | |
60 | open(changelog_file).read() |
|
61 | open(changelog_file).read() | |
61 |
|
62 | |||
62 | except IOError, err: |
|
63 | except IOError, err: | |
63 | sys.stderr.write("[WARNING] Cannot find file specified as " |
|
64 | sys.stderr.write("[WARNING] Cannot find file specified as " | |
64 | "long_description (%s)\n or changelog (%s) skipping that file" \ |
|
65 | "long_description (%s)\n or changelog (%s) skipping that file" \ | |
65 | % (readme_file, changelog_file)) |
|
66 | % (readme_file, changelog_file)) | |
66 | long_description = description |
|
67 | long_description = description | |
67 |
|
68 | |||
68 |
|
69 | |||
69 | try: |
|
70 | try: | |
70 | from setuptools import setup, find_packages |
|
71 | from setuptools import setup, find_packages | |
71 | except ImportError: |
|
72 | except ImportError: | |
72 | from ez_setup import use_setuptools |
|
73 | from ez_setup import use_setuptools | |
73 | use_setuptools() |
|
74 | use_setuptools() | |
74 | from setuptools import setup, find_packages |
|
75 | from setuptools import setup, find_packages | |
75 | #packages |
|
76 | #packages | |
76 | packages = find_packages(exclude=['ez_setup']) |
|
77 | packages = find_packages(exclude=['ez_setup']) | |
77 |
|
78 | |||
78 | setup( |
|
79 | setup( | |
79 | name='RhodeCode', |
|
80 | name='RhodeCode', | |
80 | version=get_version(), |
|
81 | version=get_version(), | |
81 | description=description, |
|
82 | description=description, | |
82 | long_description=long_description, |
|
83 | long_description=long_description, | |
83 | keywords=keywords, |
|
84 | keywords=keywords, | |
84 | license=__license__, |
|
85 | license=__license__, | |
85 | author='Marcin Kuzminski', |
|
86 | author='Marcin Kuzminski', | |
86 | author_email='marcin@python-works.com', |
|
87 | author_email='marcin@python-works.com', | |
87 | url='http://rhodecode.org', |
|
88 | url='http://rhodecode.org', | |
88 | install_requires=requirements, |
|
89 | install_requires=requirements, | |
89 | classifiers=classifiers, |
|
90 | classifiers=classifiers, | |
90 | setup_requires=["PasteScript>=1.6.3"], |
|
91 | setup_requires=["PasteScript>=1.6.3"], | |
91 | data_files=data_files, |
|
92 | data_files=data_files, | |
92 | packages=packages, |
|
93 | packages=packages, | |
93 | include_package_data=True, |
|
94 | include_package_data=True, | |
94 | test_suite='nose.collector', |
|
95 | test_suite='nose.collector', | |
95 | package_data=package_data, |
|
96 | package_data=package_data, | |
96 | message_extractors={'rhodecode': [ |
|
97 | message_extractors={'rhodecode': [ | |
97 | ('**.py', 'python', None), |
|
98 | ('**.py', 'python', None), | |
98 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
99 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), | |
99 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
100 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), | |
100 | ('public/**', 'ignore', None)]}, |
|
101 | ('public/**', 'ignore', None)]}, | |
101 | zip_safe=False, |
|
102 | zip_safe=False, | |
102 | paster_plugins=['PasteScript', 'Pylons'], |
|
103 | paster_plugins=['PasteScript', 'Pylons'], | |
103 | entry_points=""" |
|
104 | entry_points=""" | |
104 | [paste.app_factory] |
|
105 | [paste.app_factory] | |
105 | main = rhodecode.config.middleware:make_app |
|
106 | main = rhodecode.config.middleware:make_app | |
106 |
|
107 | |||
107 | [paste.app_install] |
|
108 | [paste.app_install] | |
108 | main = pylons.util:PylonsInstaller |
|
109 | main = pylons.util:PylonsInstaller | |
109 |
|
110 | |||
110 | [paste.global_paster_command] |
|
111 | [paste.global_paster_command] | |
111 | make-index = rhodecode.lib.indexers:MakeIndex |
|
112 | make-index = rhodecode.lib.indexers:MakeIndex | |
112 | upgrade-db = rhodecode.lib.dbmigrate:UpgradeDb |
|
113 | upgrade-db = rhodecode.lib.dbmigrate:UpgradeDb | |
113 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand |
|
114 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand | |
114 | """, |
|
115 | """, | |
115 | ) |
|
116 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now