Blame files/doc_pagure.wsgi
|
Pierre-Yves Chibon |
f5f7aa |
#-*- coding: utf-8 -*-
|
|
Pierre-Yves Chibon |
f5f7aa |
|
|
Pierre-Yves Chibon |
f5f7aa |
# The three lines below are required to run on EL6 as EL6 has
|
|
Pierre-Yves Chibon |
f5f7aa |
# two possible version of python-sqlalchemy and python-jinja2
|
|
Pierre-Yves Chibon |
f5f7aa |
# These lines make sure the application uses the correct version.
|
|
Pierre-Yves Chibon |
1a9b17 |
import __main__
|
|
Pierre-Yves Chibon |
1a9b17 |
__main__.__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
|
|
Pierre-Yves Chibon |
1a9b17 |
import pkg_resources
|
|
Pierre-Yves Chibon |
f5f7aa |
|
|
Pierre-Yves Chibon |
1a9b17 |
# Set the environment variable pointing to the configuration file
|
|
Pierre-Yves Chibon |
1a9b17 |
import os
|
|
Pierre-Yves Chibon |
1a9b17 |
os.environ['PAGURE_CONFIG'] = '/etc/pagure/pagure.cfg'
|
|
Pierre-Yves Chibon |
f5f7aa |
|
|
Pierre-Yves Chibon |
f5f7aa |
|
|
Pierre-Yves Chibon |
1a9b17 |
# The following is only needed if you did not install pagure
|
|
Pierre-Yves Chibon |
1a9b17 |
# as a python module (for example if you run it from a git clone).
|
|
Pierre-Yves Chibon |
f5f7aa |
#import sys
|
|
Pierre-Yves Chibon |
f5f7aa |
#sys.path.insert(0, '/path/to/pagure/')
|
|
Pierre-Yves Chibon |
f5f7aa |
|
|
Pierre-Yves Chibon |
f5f7aa |
|
|
Pierre-Yves Chibon |
1a9b17 |
# The most import line to make the wsgi working
|
|
Pierre-Yves Chibon |
1a9b17 |
from pagure.docs_server import APP as application
|
|
Pierre-Yves Chibon |
f5f7aa |
#application.debug = True
|