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